Skip to content

Commit 6765da3

Browse files
committed
Set to TestScript Job run to sync mode
1 parent 259675b commit 6765da3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ProcessMaker/Jobs/TestScript.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ public function handle()
6565
'nonce' => $this->nonce,
6666
'current_user' => $this->current_user?->id,
6767
];
68-
$response = $this->script->runScript($this->data, $this->configuration, '', null, 0, $metadata);
68+
$response = $this->script->runScript($this->data, $this->configuration, '', null, 1, $metadata);
6969
\Log::debug('Response api microservice: ' . print_r($response, true));
70-
71-
if (!config('script-runner-microservice.enabled') ||
72-
$this->script->scriptExecutor && $this->script->scriptExecutor->type === ScriptExecutorType::Custom) {
73-
$this->sendResponse(200, $response);
74-
}
70+
$status = $response['status'] === 'success' ? 200 : 500;
71+
$output = $response['status'] === 'success'
72+
? ['output' => $response['output']]
73+
: $response;
74+
$this->sendResponse($status, $output);
7575
} catch (Throwable $exception) {
7676
$this->sendResponse(500, [
7777
'exception' => get_class($exception),

0 commit comments

Comments
 (0)