From 0d3b493a76179234d19c1cb99f36eb2862dcc07a Mon Sep 17 00:00:00 2001 From: Joao Patricio Date: Tue, 21 Mar 2023 10:39:44 +0000 Subject: [PATCH] Refactoring: extract process handling from async job. --- app/Actions/RemoteProcess/DispatchRemoteProcess.php | 4 ++-- .../{ExecuteCoolifyProcess.php => ExecuteRemoteProcess.php} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename app/Jobs/{ExecuteCoolifyProcess.php => ExecuteRemoteProcess.php} (93%) diff --git a/app/Actions/RemoteProcess/DispatchRemoteProcess.php b/app/Actions/RemoteProcess/DispatchRemoteProcess.php index c907c7a7d..9c7cb20b2 100644 --- a/app/Actions/RemoteProcess/DispatchRemoteProcess.php +++ b/app/Actions/RemoteProcess/DispatchRemoteProcess.php @@ -3,7 +3,7 @@ namespace App\Actions\RemoteProcess; use App\Data\RemoteProcessArgs; -use App\Jobs\ExecuteCoolifyProcess; +use App\Jobs\ExecuteRemoteProcess; use Spatie\Activitylog\Models\Activity; class DispatchRemoteProcess @@ -18,7 +18,7 @@ public function __construct(RemoteProcessArgs $remoteProcessArgs){ public function __invoke(): Activity { - $job = new ExecuteCoolifyProcess($this->activity); + $job = new ExecuteRemoteProcess($this->activity); dispatch($job); diff --git a/app/Jobs/ExecuteCoolifyProcess.php b/app/Jobs/ExecuteRemoteProcess.php similarity index 93% rename from app/Jobs/ExecuteCoolifyProcess.php rename to app/Jobs/ExecuteRemoteProcess.php index 9cdcaa809..567c88d9a 100755 --- a/app/Jobs/ExecuteCoolifyProcess.php +++ b/app/Jobs/ExecuteRemoteProcess.php @@ -10,7 +10,7 @@ use Illuminate\Queue\SerializesModels; use Spatie\Activitylog\Models\Activity; -class ExecuteCoolifyProcess implements ShouldQueue +class ExecuteRemoteProcess implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;