1
0
Fork 0
mirror of synced 2024-06-02 19:04:49 +12:00

Update DB to use 1MB

This commit is contained in:
Bradley Schofield 2022-03-21 11:52:10 +00:00
parent 2e00acc17b
commit 5dc4a9039f
3 changed files with 9 additions and 8 deletions

View file

@ -2007,7 +2007,7 @@ $collections = [
'$id' => 'stderr',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 1048576,
'size' => 1000000,
'signed' => true,
'required' => false,
'default' => '',
@ -2018,7 +2018,7 @@ $collections = [
'$id' => 'stdout',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 1048576,
'size' => 1000000,
'signed' => true,
'required' => false,
'default' => '',
@ -2124,7 +2124,7 @@ $collections = [
'$id' => 'stdout',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 1048576,
'size' => 1000000,
'signed' => true,
'required' => false,
'default' => null,
@ -2135,7 +2135,7 @@ $collections = [
'$id' => 'stderr',
'type' => Database::VAR_STRING,
'format' => '',
'size' => 1048576,
'size' => 1000000,
'signed' => true,
'required' => false,
'default' => null,

View file

@ -283,8 +283,8 @@ App::post('/v1/runtimes')
$endTime = \time();
$container = array_merge($container, [
'status' => 'ready',
'stdout' => \mb_substr(\utf8_encode($stdout), 0, 1048576), // Limit to 1MB
'stderr' => \mb_substr(\utf8_encode($stderr), 0, 1048576), // Limit to 1MB
'stdout' => \mb_strcut(\utf8_encode($stdout), 0, 1000000), // Limit to 1MB
'stderr' => \mb_strcut(\utf8_encode($stderr), 0, 1000000), // Limit to 1MB
'startTime' => $startTime,
'endTime' => $endTime,
'duration' => $endTime - $startTime,
@ -501,8 +501,8 @@ App::post('/v1/execution')
$execution = [
'status' => $functionStatus,
'statusCode' => $statusCode,
'stdout' => \mb_substr(\utf8_encode($stdout), 0, 1048576), // Limit to 1MB
'stderr' => \mb_substr(\utf8_encode($stderr), 0, 1048576), // Limit to 1MB
'stdout' => \mb_strcut(\utf8_encode($stdout), 0, 1000000), // Limit to 1MB
'stderr' => \mb_strcut(\utf8_encode($stderr), 0, 1000000), // Limit to 1MB
'time' => $executionTime,
];

1
open-runtimes Submodule

@ -0,0 +1 @@
Subproject commit c4f2c21404011a5a75dc891ff892695534b2df76