Refactoring: extract process handling from async job.
This commit is contained in:
parent
29fb40bd16
commit
0d3b493a76
@ -3,7 +3,7 @@
|
|||||||
namespace App\Actions\RemoteProcess;
|
namespace App\Actions\RemoteProcess;
|
||||||
|
|
||||||
use App\Data\RemoteProcessArgs;
|
use App\Data\RemoteProcessArgs;
|
||||||
use App\Jobs\ExecuteCoolifyProcess;
|
use App\Jobs\ExecuteRemoteProcess;
|
||||||
use Spatie\Activitylog\Models\Activity;
|
use Spatie\Activitylog\Models\Activity;
|
||||||
|
|
||||||
class DispatchRemoteProcess
|
class DispatchRemoteProcess
|
||||||
@ -18,7 +18,7 @@ public function __construct(RemoteProcessArgs $remoteProcessArgs){
|
|||||||
|
|
||||||
public function __invoke(): Activity
|
public function __invoke(): Activity
|
||||||
{
|
{
|
||||||
$job = new ExecuteCoolifyProcess($this->activity);
|
$job = new ExecuteRemoteProcess($this->activity);
|
||||||
|
|
||||||
dispatch($job);
|
dispatch($job);
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
use Spatie\Activitylog\Models\Activity;
|
use Spatie\Activitylog\Models\Activity;
|
||||||
|
|
||||||
class ExecuteCoolifyProcess implements ShouldQueue
|
class ExecuteRemoteProcess implements ShouldQueue
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user