Did you find any solution to this? I am having the same issue on my staging server -- my local environment displays the data correctly.
Horizon Metrics empty
Having a few issues getting Horizon to show metrics. The Dashboard correctly shows the queue names under Current Workload, but these never seem to propagate into the Metrics screen. I only ever see "There aren't any jobs." or "There aren't any queues.".
I do however see the Jobs show up in "Recent Jobs" and the failures in "Failed".
In my /config/horizon.php file I have modified the following settings:
'prefix' => env('HORIZON_PREFIX', 'horizon1:'),
'environments' => [
'production' => [
'supervisor-1' => [
'connection' => 'redis',
'queue' => ['default'],
'balance' => 'auto',
'processes' => 10,
'tries' => 3,
],
],
'local' => [
'supervisor-1' => [
'connection' => 'redis',
'queue' => ['default','video','gps','log'],
'balance' => 'auto',
'processes' => 3,
'tries' => 3,
],
],
],
I'm not sure that I really need a 'default' queue... I kindof just left that in there.
in my jobs I have for example
$queue="video";
$delay="5",
...
$job = (new ImportUnencrypted($file->getRealPath(), $this->queueRunTime, $this->singlefile))->onQueue($queue)->delay($delay);
...
dispatch($job)
As this is a batch process, I also tried to clear the queues with
$queues = ['gps','log', 'video'];
...
if ($this->isRedis) {
foreach ($queues as $queue) {
$this->info('Clearing queue: ' . $queue);
redis::connection()->del('queues:' + $queue);
}
}
But that didn't seem to work either. At the moment the only way I seem to be able to do this is to halt the supervisor process and issue a
php artisan cache:clear
Where am I going wrong?
Please or to participate in this conversation.