Publication initiale de RelaisSMS : documentation et sources nettoyees
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\Calendar\CalendarEventSyncService;
|
||||
use Illuminate\Console\Command;
|
||||
use Throwable;
|
||||
|
||||
class SyncCalDavCalendarCommand extends Command
|
||||
{
|
||||
protected $signature = 'calendar:sync-caldav';
|
||||
|
||||
protected $description = 'Synchronise les evenements depuis l agenda CalDAV configure.';
|
||||
|
||||
public function handle(CalendarEventSyncService $syncService): int
|
||||
{
|
||||
try {
|
||||
$run = $syncService->sync();
|
||||
} catch (Throwable $exception) {
|
||||
$this->error('Synchronisation CalDAV agenda en echec : '.$exception->getMessage());
|
||||
|
||||
return self::FAILURE;
|
||||
}
|
||||
|
||||
$this->info((string) $run->message);
|
||||
$this->line('Objets lus : '.$run->fetched_contacts);
|
||||
$this->line('Evenements synchronises : '.$run->synced_contacts);
|
||||
$this->line('Evenements annules localement : '.$run->deleted_contacts);
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user