clrghouz/app/Jobs/AddressIdleDomain.php
Deon George 46cf488337
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 37s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m34s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
NodesNew also now sends an Echomail
2024-12-08 21:38:10 +11:00

28 lines
629 B
PHP

<?php
namespace App\Jobs;
use Carbon\Carbon;
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
{
foreach (Domain::whereNotNull('nodestatus_id')->cursor() as $do) {
AddressIdle::dispatch($do);
NodesNew::dispatch($do,Carbon::now()->subWeek()->startOfDay());
}
}
}