diff --git a/src/Contracts/MetricsRepository.php b/src/Contracts/MetricsRepository.php index 9117283b..c996a1b6 100644 --- a/src/Contracts/MetricsRepository.php +++ b/src/Contracts/MetricsRepository.php @@ -82,7 +82,7 @@ public function queueWithMaximumThroughput(); * Increment the metrics information for a job. * * @param string $job - * @param float $runtime + * @param float|null $runtime * @return void */ public function incrementJob($job, $runtime); @@ -91,7 +91,7 @@ public function incrementJob($job, $runtime); * Increment the metrics information for a queue. * * @param string $queue - * @param float $runtime + * @param float|null $runtime * @return void */ public function incrementQueue($queue, $runtime); diff --git a/src/Repositories/RedisMetricsRepository.php b/src/Repositories/RedisMetricsRepository.php index c3abe54d..9fffe147 100644 --- a/src/Repositories/RedisMetricsRepository.php +++ b/src/Repositories/RedisMetricsRepository.php @@ -177,13 +177,13 @@ public function queueWithMaximumThroughput() * Increment the metrics information for a job. * * @param string $job - * @param float $runtime + * @param float|null $runtime * @return void */ public function incrementJob($job, $runtime) { $this->connection()->eval(LuaScripts::updateMetrics(), 2, - 'job:'.$job, 'measured_jobs', str_replace(',', '.', $runtime) + 'job:'.$job, 'measured_jobs', str_replace(',', '.', (string) $runtime) ); } @@ -191,13 +191,13 @@ public function incrementJob($job, $runtime) * Increment the metrics information for a queue. * * @param string $queue - * @param float $runtime + * @param float|null $runtime * @return void */ public function incrementQueue($queue, $runtime) { $this->connection()->eval(LuaScripts::updateMetrics(), 2, - 'queue:'.$queue, 'measured_queues', str_replace(',', '.', $runtime) + 'queue:'.$queue, 'measured_queues', str_replace(',', '.', (string) $runtime) ); }