Skip to content

Commit 63945a5

Browse files
Refine logging and documentation for schedule setup
- Updated the log message in `setupWeeklyReportSchedule` to clarify the reason for creating a new schedule when it is not found. - Enhanced the documentation in `temporal.ts` to direct users to the `scheduleConfig` object for detailed schedule configuration information. These changes improve the clarity of error messages and documentation, aiding in better understanding and maintenance of the scheduling system.
1 parent 95a45d0 commit 63945a5

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

workers/main/src/configs/schedules.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function setupWeeklyReportSchedule(client: Client): Promise<void> {
2727

2828
// Schedule doesn't exist, create it
2929
logger.info(
30-
`Creating schedule ${SCHEDULE_ID} with error: ${errorMessage}`,
30+
`Schedule ${SCHEDULE_ID} not found, creating schedule. Reason: ${errorMessage}`,
3131
);
3232
}
3333

workers/main/src/configs/temporal.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ export const temporalSchema = z.object({
1919
* Schedule Configuration Documentation
2020
*
2121
* Weekly Financial Report Schedule:
22-
* - Schedule ID: 'weekly-financial-report-schedule'
23-
* - Cron Expression: '0 13 * * 2' (Every Tuesday at 1 PM)
24-
* - Timezone: 'America/New_York' (automatically handles EST/EDT transitions)
25-
* - Workflow: weeklyFinancialReportsWorkflow
26-
* - Task Queue: 'main-queue'
27-
* - Overlap Policy: SKIP (prevents concurrent runs)
28-
* - Catchup Window: 1 day (runs missed schedules within 24 hours)
29-
*
3022
* The schedule is automatically created/verified when the worker starts.
31-
* See src/configs/schedules.ts for implementation details.
23+
*
24+
* For schedule configuration details (schedule ID, cron expression, timezone, etc.),
25+
* see the exported `scheduleConfig` object in ./schedules.ts
26+
*
27+
* Implementation: ./schedules.ts
3228
*/

0 commit comments

Comments
 (0)