clrghouz/app/Jobs/AddressIdleDomain.php
Deon George f8cb6ccc37
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 38s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m43s
Create Docker Image / Final Docker Image Manifest (push) Successful in 11s
Automatically mark idle nodes HOLD/DOWN/DE-LIST. Automatically validate presented addresses.
2024-05-25 22:31:42 +10:00

32 lines
616 B
PHP

<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use App\Models\Domain;
class AddressIdleDomain implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*/
public function __construct()
{
}
/**
* Execute the job.
*/
public function handle(): void
{
foreach (Domain::whereNotNull('nodestatus_id')->cursor() as $do)
AddressIdle::dispatch($do);
}
}