1
0
Fork 0
mirror of synced 2024-07-04 06:00:53 +12:00

Merge pull request #6332 from appwrite/fix-long-running-functions

Fix execution call timeout
This commit is contained in:
Christy Jacob 2023-09-27 17:16:30 -04:00 committed by GitHub
commit d0f2a101a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -202,7 +202,9 @@ class Executor
'runtimeEntrypoint' => $runtimeEntrypoint, 'runtimeEntrypoint' => $runtimeEntrypoint,
]; ];
$timeout = (int) App::getEnv('_APP_FUNCTIONS_BUILD_TIMEOUT', 900); // Safety timeout. Executor has timeout, and open runtime has soft timeout.
// This one shouldn't really happen, but prevents from unexpected networking behaviours.
$timeout = $timeout + 15;
$response = $this->call(self::METHOD_POST, $route, [ 'x-opr-runtime-id' => $runtimeId ], $params, true, $timeout); $response = $this->call(self::METHOD_POST, $route, [ 'x-opr-runtime-id' => $runtimeId ], $params, true, $timeout);