lasthourcloud/app/Jobs/ExecuteCoolifyProcess.php

36 lines
795 B
PHP
Raw Normal View History

2023-03-20 12:04:22 +00:00
<?php
namespace App\Jobs;
use App\Actions\RemoteProcess\RemoteProcess;
2023-03-20 12:04:22 +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 Spatie\Activitylog\Contracts\Activity;
class ExecuteCoolifyProcess implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*/
public function __construct(
public Activity $activity,
){}
/**
* Execute the job.
*/
public function handle(): void
2023-03-20 12:04:22 +00:00
{
$remoteProcess = resolve(RemoteProcess::class, [
'activity' => $this->activity,
]);
$remoteProcess();
2023-03-20 12:04:22 +00:00
}
}