2024-05-25 12:25:57 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Jobs;
|
|
|
|
|
2024-12-08 10:38:10 +00:00
|
|
|
use Carbon\Carbon;
|
2024-05-25 12:25:57 +00:00
|
|
|
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;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute the job.
|
|
|
|
*/
|
|
|
|
public function handle(): void
|
|
|
|
{
|
2024-12-08 10:38:10 +00:00
|
|
|
foreach (Domain::whereNotNull('nodestatus_id')->cursor() as $do) {
|
2024-05-25 12:25:57 +00:00
|
|
|
AddressIdle::dispatch($do);
|
2024-12-08 10:38:10 +00:00
|
|
|
NodesNew::dispatch($do,Carbon::now()->subWeek()->startOfDay());
|
|
|
|
}
|
2024-05-25 12:25:57 +00:00
|
|
|
}
|
|
|
|
}
|