Add async=false solution

This commit is contained in:
Mayank Agarwal 2025-05-19 20:52:49 +05:30 committed by Khushboo Verma
parent 41743b1299
commit 492ff10ee7

View file

@ -423,12 +423,21 @@ class Create extends Base
}
}
$maxLogLength = 100000;
$logs = $executionResponse['logs'] ?? '';
$logsTruncated = false;
if (\is_string($logs) && \strlen($logs) > $maxLogLength) {
$logs = \substr($logs, 0, $maxLogLength) . "\n[WARNING] Logs truncated. The output exceeded {$maxLogLength} characters.";
$logsTruncated = true;
}
/** Update execution status */
$status = $executionResponse['statusCode'] >= 500 ? 'failed' : 'completed';
$execution->setAttribute('status', $status);
$execution->setAttribute('responseStatusCode', $executionResponse['statusCode']);
$execution->setAttribute('responseHeaders', $headersFiltered);
$execution->setAttribute('logs', $executionResponse['logs']);
$execution->setAttribute('logs', $logs);
$execution->setAttribute('errors', $executionResponse['errors']);
$execution->setAttribute('duration', $executionResponse['duration']);
} catch (\Throwable $th) {