Auto-start on boot

This commit is contained in:
Arunavo Ray
2025-09-07 16:29:23 +05:30
parent 9f21cd6b1a
commit fab4efd93a
5 changed files with 311 additions and 12 deletions

View File

@@ -179,7 +179,10 @@ export const onRequest = defineMiddleware(async (context, next) => {
if (recoveryInitialized && !schedulerServiceStarted) {
try {
console.log('Starting automatic mirror scheduler service...');
startSchedulerService();
// Start the scheduler service (now async)
startSchedulerService().catch(error => {
console.error('Error in scheduler service startup:', error);
});
// Register scheduler service shutdown callback
registerShutdownCallback(async () => {