[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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user