@@ -20,7 +20,7 @@ |
||
| 20 | 20 | $taskWorkerNum = isset($swoole->setting['task_worker_num']) ? $swoole->setting['task_worker_num'] : 0; |
| 21 | 21 | $totalNum = $workerNum + $taskWorkerNum - 1; |
| 22 | 22 | $workerIds = range(0, $totalNum); |
| 23 | - $runJob = function () use ($swoole, $workerIds, $collector) { |
|
| 23 | + $runJob = function() use ($swoole, $workerIds, $collector) { |
|
| 24 | 24 | foreach ($workerIds as $workerId) { |
| 25 | 25 | $swoole->sendMessage($collector, $workerId); |
| 26 | 26 | } |
@@ -13,22 +13,22 @@ |
||
| 13 | 13 | public function boot() |
| 14 | 14 | { |
| 15 | 15 | $this->publishes([ |
| 16 | - __DIR__ . '/../../../config/prometheus.php' => base_path('config/prometheus.php'), |
|
| 16 | + __DIR__.'/../../../config/prometheus.php' => base_path('config/prometheus.php'), |
|
| 17 | 17 | ]); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function register() |
| 21 | 21 | { |
| 22 | 22 | $this->mergeConfigFrom( |
| 23 | - __DIR__ . '/../../../config/prometheus.php', 'prometheus' |
|
| 23 | + __DIR__.'/../../../config/prometheus.php', 'prometheus' |
|
| 24 | 24 | ); |
| 25 | - $this->app->singleton(HttpRequestCollector::class, function ($app) { |
|
| 25 | + $this->app->singleton(HttpRequestCollector::class, function($app) { |
|
| 26 | 26 | return new HttpRequestCollector($app['config']->get('prometheus')); |
| 27 | 27 | }); |
| 28 | - $this->app->singleton(SwooleWorkerCollector::class, function ($app) { |
|
| 28 | + $this->app->singleton(SwooleWorkerCollector::class, function($app) { |
|
| 29 | 29 | return new SwooleWorkerCollector($app['config']->get('prometheus')); |
| 30 | 30 | }); |
| 31 | - $this->app->singleton(PrometheusExporter::class, function ($app) { |
|
| 31 | + $this->app->singleton(PrometheusExporter::class, function($app) { |
|
| 32 | 32 | return new PrometheusExporter($app['config']->get('prometheus')); |
| 33 | 33 | }); |
| 34 | 34 | } |