Increase Execution output limit to 1MB

This commit is contained in:
Bradley Schofield
2022-03-21 11:25:08 +00:00
parent afb3b69008
commit 2e00acc17b
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -2007,7 +2007,7 @@ $collections = [
'$id' => 'stderr',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'size' => 1048576,
'signed' => true,
'required' => false,
'default' => '',
@@ -2018,7 +2018,7 @@ $collections = [
'$id' => 'stdout',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'size' => 1048576,
'signed' => true,
'required' => false,
'default' => '',
@@ -2124,7 +2124,7 @@ $collections = [
'$id' => 'stdout',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'size' => 1048576,
'signed' => true,
'required' => false,
'default' => null,
@@ -2135,7 +2135,7 @@ $collections = [
'$id' => 'stderr',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 16384,
'size' => 1048576,
'signed' => true,
'required' => false,
'default' => null,
+4 -4
View File
@@ -283,8 +283,8 @@ App::post('/v1/runtimes')
$endTime = \time();
$container = array_merge($container, [
'status' => 'ready',
'stdout' => \utf8_encode($stdout),
'stderr' => \utf8_encode($stderr),
'stdout' => \mb_substr(\utf8_encode($stdout), 0, 1048576), // Limit to 1MB
'stderr' => \mb_substr(\utf8_encode($stderr), 0, 1048576), // Limit to 1MB
'startTime' => $startTime,
'endTime' => $endTime,
'duration' => $endTime - $startTime,
@@ -501,8 +501,8 @@ App::post('/v1/execution')
$execution = [
'status' => $functionStatus,
'statusCode' => $statusCode,
'stdout' => \utf8_encode(\mb_substr($stdout, -16384)),
'stderr' => \utf8_encode(\mb_substr($stderr, -16384)),
'stdout' => \mb_substr(\utf8_encode($stdout), 0, 1048576), // Limit to 1MB
'stderr' => \mb_substr(\utf8_encode($stderr), 0, 1048576), // Limit to 1MB
'time' => $executionTime,
];