Skip to content

Commit ec77291

Browse files
Multiple Queues Support
1 parent f213e69 commit ec77291

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

config/config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010

1111
'key' => env('MONITOR_KEY'),
1212

13+
'queues' => ['default'],
1314

1415
];

src/MonitorClass.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ protected function getCpuLoad()
6767

6868
protected function getQueue()
6969
{
70-
$this->results['queue'] = Queue::size();
70+
$total = 0;
71+
foreach (config('krebsmonitor.queues') as $queue) {
72+
$total = $total + Queue::size($queue);
73+
}
74+
75+
$this->results['queue'] = $total;
7176
}
7277

7378

src/MonitorServiceProvider.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ class MonitorServiceProvider extends ServiceProvider
1212
public function boot()
1313
{
1414
$this->loadRoutesFrom(__DIR__.'/routes.php');
15+
16+
$this->publishes([
17+
__DIR__.'/../config/config.php' => config_path('krebsmonitor.php'),
18+
]);
19+
1520
}
1621

1722
/**

0 commit comments

Comments
 (0)