[Fix] Internal cron scheduler blocking view responses

Internal cron is now triggered by an axios request from the frontend so it can truly run in a separate request. Fixes #167
This commit is contained in:
2025-12-07 12:55:33 +01:00
parent 25034ee2f3
commit 6b688f72e0
8 changed files with 108 additions and 119 deletions
@@ -18,6 +18,7 @@ public function handle(CaldavService $service)
// only run every 5 minutes although the task is called every minute
$cacheKey = 'caldav_sync_last_run';
if (\Illuminate\Support\Facades\Cache::has($cacheKey)) {
Log::info('CalDAV sync Throttled');
return 0;
}
Cache::put($cacheKey, true, 300);
@@ -33,6 +34,7 @@ public function handle(CaldavService $service)
$count++;
}
Log::info("Synced " . count($todos) . " todos.");
$this->info("Synced " . count($todos) . " todos.");
return 0;
}