enabled = (bool) SettingsHelper::get('influx_db_enabled')->value; } /** * Execute the console command. * * @return int */ public function handle() { if (!$this->enabled) { $this->warn('InfluxDB is not enabled'); exit; } try { InfluxDB::connect(); $this->info('Connected successfully'); } catch (InfluxDBConnectionErrorException $e) { $this->error('Couldn\'t connect'); return 1; } return 0; } }