@jiggai/recipes 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/handlers/cron.ts +8 -0
package/package.json
CHANGED
package/src/handlers/cron.ts
CHANGED
|
@@ -376,6 +376,7 @@ export async function reconcileRecipeCronJobs(opts: {
|
|
|
376
376
|
const desiredIds = new Set(desired.map((j) => j.id));
|
|
377
377
|
const results: CronReconcileResult[] = [];
|
|
378
378
|
|
|
379
|
+
try {
|
|
379
380
|
await reconcileDesiredCronJobs({
|
|
380
381
|
...opts,
|
|
381
382
|
desired,
|
|
@@ -396,6 +397,13 @@ export async function reconcileRecipeCronJobs(opts: {
|
|
|
396
397
|
results,
|
|
397
398
|
});
|
|
398
399
|
await writeJsonFile(statePath, state);
|
|
400
|
+
} catch (err) {
|
|
401
|
+
if (isCronToolUnavailableError(err)) {
|
|
402
|
+
console.error('[recipes] note: cron tool unavailable; skipping cron reconciliation (scaffold will proceed).');
|
|
403
|
+
return { ok: true as const, changed: false as const, note: "cron-tool-unavailable" as const, desiredCount: desired.length };
|
|
404
|
+
}
|
|
405
|
+
throw err;
|
|
406
|
+
}
|
|
399
407
|
|
|
400
408
|
const changed = results.some(
|
|
401
409
|
(r) => r.action === "created" || r.action === "updated" || r.action?.startsWith("disabled")
|