activity = activity() ->withProperty('type', 'COOLIFY_PROCESS') ->withProperty('user', $this->user) ->withProperty('destination', $this->destination) ->withProperty('port', $this->port) ->withProperty('command', $this->command) ->withProperty('status', ProcessStatus::HOLDING) ->log("Awaiting to start command...\n\n"); } public function __invoke(): Activity|ProcessResult { $job = new ExecuteCoolifyProcess($this->activity); if (app()->environment('testing')) { return $job->handle(); } dispatch($job); return $this->activity; } }