Refactoring: extract process handling from async job.

This commit is contained in:
Joao Patricio
2023-03-21 09:56:49 +00:00
parent 83a7ef21f3
commit cf121062a1
6 changed files with 34 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
<?php
use App\Services\CoolifyProcess;
use App\Actions\RemoteProcess\DispatchRemoteProcess;
use Spatie\Activitylog\Contracts\Activity;
if (! function_exists('remoteProcess')) {
@@ -11,7 +11,7 @@ if (! function_exists('remoteProcess')) {
*/
function remoteProcess($command, $destination): Activity
{
return resolve(CoolifyProcess::class, [
return resolve(DispatchRemoteProcess::class, [
'destination' => $destination,
'command' => $command,
])();