Automatically mark idle nodes HOLD/DOWN/DE-LIST. Automatically validate presented addresses.
This commit is contained in:
32
app/Jobs/AddressIdleDomain.php
Normal file
32
app/Jobs/AddressIdleDomain.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user