Skip to content

Commit

Permalink
feat: add environment variable for configuring max_execution_time (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ectelion committed Jan 10, 2024
1 parent 02f1777 commit fd1ca55
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions router.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
// registered
$projectContext->registerCloudStorageStreamWrapperIfPossible();

// Initialize timeout, in case configured.
$custom_timeout = getenv('CLOUD_RUN_TIMEOUT_SECONDS');
if ($custom_timeout !== false) {
set_time_limit($custom_timeout);
}

/**
* Invoke the function based on the function type.
*/
Expand Down

0 comments on commit fd1ca55

Please sign in to comment.