mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-22 16:14:22 +02:00
feat: randomly sleep between executions
This commit is contained in:
parent
ff8d8371ad
commit
e0289e2949
@ -17,6 +17,7 @@
|
||||
use Illuminate\Queue\Middleware\WithoutOverlapping;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Sleep;
|
||||
|
||||
class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
|
||||
{
|
||||
@ -37,10 +38,10 @@ public function __construct(public Server $server)
|
||||
$this->handle();
|
||||
}
|
||||
|
||||
|
||||
public function handle()
|
||||
{
|
||||
// ray("checking container statuses for {$this->server->id}");
|
||||
$rand = rand(1, 15);
|
||||
Sleep::for($rand)->seconds();
|
||||
try {
|
||||
if (!$this->server->isServerReady()) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user