Files
immich-power-tools/src/instrumentation.ts
T
Varun d0a7894a25 feat: per-user settings, workflow API key, cron scheduler, and engine logging
- Add ownerId to settings table for per-user key-value storage
- Add settings KV API endpoint scoped by user
- Add workflow API key config in settings page
- Action executor uses per-user workflow API key, falls back to session auth
- Bootstrap cron scheduler on server start via instrumentation hook
- Re-register/unregister cron on workflow enable/disable/delete
- Downgrade node-cron to v3 for Turbopack compatibility
- Add structured console logs to workflow engine for all steps
- Enabled toggle saves immediately to server
- Schedule popover saves immediately to server
- Use react-hot-toast instead of shadcn toast in workflow editor
2026-04-07 20:38:59 +05:30

14 lines
469 B
TypeScript

export async function register() {
// Only run on the Node.js server, not in the Edge runtime or client
if (process.env.NEXT_RUNTIME === "nodejs") {
const { runMigrations } = await import("./db");
await runMigrations();
const { resumePendingJobs } = await import("./workers/import/runner");
await resumePendingJobs();
const { loadAllScheduledWorkflows } = await import("./lib/workflow/scheduler");
await loadAllScheduledWorkflows();
}
}