Mod Queue name
This commit is contained in:
parent
30fc4926c4
commit
63b90ef722
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue