Fix: Job to check invoice due dates was never run
Made it a command so it runs with the scheduler
This commit is contained in:
@@ -14,7 +14,7 @@ class CaldavSyncCommand extends Command
|
||||
protected $signature = 'caldav:sync';
|
||||
protected $description = 'Sync CalDAV VTODOs into local todos table';
|
||||
|
||||
public function handle(CaldavService $service)
|
||||
public function handle(CaldavService $service)
|
||||
{
|
||||
// only run every 5 minutes although the task is called every minute
|
||||
$cacheKey = 'caldav_sync_last_run';
|
||||
@@ -24,8 +24,8 @@ public function handle(CaldavService $service)
|
||||
}
|
||||
Cache::put($cacheKey, true, 300);
|
||||
|
||||
Log::info('Running CalDAV sync');
|
||||
$this->info('Starting CalDAV sync');
|
||||
Log::info('Synchronizing Todo itmes with CalDAV server');
|
||||
$this->info('Synchronizing Todo itmes with CalDAV server');
|
||||
|
||||
$todos = $service->getTodos();
|
||||
|
||||
@@ -106,6 +106,7 @@ public function handle(CaldavService $service)
|
||||
|
||||
Log::info("Synced " . count($todos) . " todos.");
|
||||
$this->info("Synced " . count($todos) . " todos.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user