diff --git a/src/Commands/SyncCommand.php b/src/Commands/SyncCommand.php index 03b2af8..103fd4f 100644 --- a/src/Commands/SyncCommand.php +++ b/src/Commands/SyncCommand.php @@ -42,6 +42,16 @@ public function handle( Laritor $laritor ) { + if (! config('laritor.keys.backend') ) { + $this->error('Laritor key is not configured. Please add the LARITOR_BACKEND_KEY env variable'); + return self::FAILURE; + } + + if (! config('laritor.ingest_endpoint') ) { + $this->error('Laritor ingest endpoint is not configured. Please add the LARITOR_INGEST_ENDPOINT env variable'); + return self::FAILURE; + } + $scheduled_tasks = $scheduledTaskHelper->getScheduledTasks();; $health_checks = $healthCheckHelper->getHealthChecks(); diff --git a/src/LaritorServiceProvider.php b/src/LaritorServiceProvider.php index d48c556..81f9bef 100755 --- a/src/LaritorServiceProvider.php +++ b/src/LaritorServiceProvider.php @@ -34,7 +34,7 @@ class LaritorServiceProvider extends ServiceProvider */ public function boot() { - if ( ! config('laritor.enabled') || !config('laritor.keys.backend') ) { + if ( ! config('laritor.enabled') ) { return; }