Commit 7d91ed8
authored
feat(cron): add logging for skipped cron jobs (#2807)
* Fix race condition in ProcessService initialization
This reverts the regression introduced in commit 0727fed which caused
all processes to be treated as "disabled" during the initial startup
window before async resyncDisabledProcesses() completed.
Changes:
- Initialize DisabledProcesses with empty map {} instead of undefined
- Simplify DisabledProcess() to only return true when explicitly disabled
- Add synchronous initialization from Config.disabledProcesses()
- Add logging to DfxCronService when jobs are skipped due to disabled process
The previous logic returned true (disabled) when DisabledProcesses was
undefined, causing a race condition where cron jobs triggered before
the async initialization completed would be silently skipped.
* style: fix prettier formatting
* refactor: keep only logging, revert race condition fix
Keep the useful logging for skipped cron jobs but revert the
ProcessService changes since the race condition is self-healing
and hasn't caused issues in 6 months.1 parent a9bc5fe commit 7d91ed8
1 file changed
Lines changed: 11 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| 65 | + | |
| 66 | + | |
62 | 67 | | |
63 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| |||
0 commit comments