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); }); } }