From 63b90ef72210634a51ea160ceefc30387f9cb548 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Thu, 18 Jul 2024 12:04:07 +0200 Subject: [PATCH] Mod Queue name --- src/FillCoordsJob.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FillCoordsJob.php b/src/FillCoordsJob.php index 9083ddc..b53c862 100644 --- a/src/FillCoordsJob.php +++ b/src/FillCoordsJob.php @@ -23,6 +23,7 @@ class FillCoordsJob implements ShouldQueue */ public function __construct(public Geolocatable $model) { + $this->onQueue('forever'); } /** @@ -32,7 +33,7 @@ class FillCoordsJob implements ShouldQueue */ public function handle() { - Redis::throttle('osm')->block(0)->allow(1)->every(2)->then(function () { + Redis::throttle('osm')->block(0)->allow(1)->every(3)->then(function () { $address = $this->model->getAddressForGeolocation(); if (!$address) { $this->model->destroyCoordinate(); @@ -46,7 +47,7 @@ class FillCoordsJob implements ShouldQueue } $this->model->fillCoordinate($coordinate); }, function () { - $this->release(5); + return $this->release(5); }); } }