Skip to content

Commit 6ab7fa7

Browse files
authored
[Feature] Unique Ookla speedtest job and increased timeout (alexjustesen#1418)
1 parent c981e01 commit 6ab7fa7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/Jobs/Speedtests/ExecuteOoklaSpeedtest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use App\Events\SpeedtestFailed;
88
use App\Models\Result;
99
use Illuminate\Bus\Queueable;
10+
use Illuminate\Contracts\Queue\ShouldBeUnique;
1011
use Illuminate\Contracts\Queue\ShouldQueue;
1112
use Illuminate\Foundation\Bus\Dispatchable;
1213
use Illuminate\Queue\InteractsWithQueue;
@@ -15,10 +16,17 @@
1516
use Symfony\Component\Process\Exception\ProcessFailedException;
1617
use Symfony\Component\Process\Process;
1718

18-
class ExecuteOoklaSpeedtest implements ShouldQueue
19+
class ExecuteOoklaSpeedtest implements ShouldBeUnique, ShouldQueue
1920
{
2021
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
2122

23+
/**
24+
* The number of seconds the job can run before timing out.
25+
*
26+
* @var int
27+
*/
28+
public $timeout = 120;
29+
2230
/**
2331
* Create a new job instance.
2432
*/

0 commit comments

Comments
 (0)