diff --git a/.env b/.env index 9ab53a967..9948d4d22 100644 --- a/.env +++ b/.env @@ -17,4 +17,6 @@ _APP_INFLUXDB_PORT=8086 _APP_STATSD_HOST=telegraf _APP_STATSD_PORT=8125 _APP_SMTP_HOST=maildev -_APP_SMTP_PORT=25 \ No newline at end of file +_APP_SMTP_PORT=25 +_APP_FUNCTIONS_TIMEOUT=900 +_APP_FUNCTIONS_CONTAINERS=10 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 5fd69f865..2d3eeae80 100755 --- a/Dockerfile +++ b/Dockerfile @@ -92,6 +92,8 @@ ENV TZ=Asia/Tel_Aviv \ _APP_STATSD_PORT=8125 \ _APP_SMTP_HOST=smtp \ _APP_SMTP_PORT=25 \ + _APP_FUNCTIONS_TIMEOUT=900 \ + _APP_FUNCTIONS_CONTAINERS=10 \ _APP_SETUP=self-hosted \ _APP_VERSION=$VERSION #ENV _APP_SMTP_SECURE '' diff --git a/app/controllers/web/console.php b/app/controllers/web/console.php index 1e81c240b..3e54122b3 100644 --- a/app/controllers/web/console.php +++ b/app/controllers/web/console.php @@ -368,6 +368,7 @@ App::get('/console/functions/function') ->setParam('events', Config::getParam('events', [])) ->setParam('fileLimit', App::getEnv('_APP_STORAGE_LIMIT', 0)) ->setParam('fileLimitHuman', Storage::human(App::getEnv('_APP_STORAGE_LIMIT', 0))) + ->setParam('timeout', (int) App::getEnv('_APP_FUNCTIONS_TIMEOUT', 900)) ; $layout diff --git a/app/views/console/functions/function.phtml b/app/views/console/functions/function.phtml index b4e148d8d..3f96eee17 100644 --- a/app/views/console/functions/function.phtml +++ b/app/views/console/functions/function.phtml @@ -2,6 +2,7 @@ $fileLimit = $this->getParam('fileLimit', 0); $fileLimitHuman = $this->getParam('fileLimitHuman', 0); $events = array_keys($this->getParam('events', [])); +$timeout = $this->getParam('timeout', 900); ?>
getParam('events', []));  
- + -
getParam('events', [])); data-failure-param-alert-classname="error"> - +   |  
@@ -164,7 +165,7 @@ $events = array_keys($this->getParam('events', [])); - +
(Max file size allowed: )
@@ -407,8 +408,8 @@ $events = array_keys($this->getParam('events', [])); - -
Max value is 900 seconds (15 minutes)
+ +
Max value is escape(number_format($timeout)); ?> seconds (escape((int) ($timeout / 60)); ?> minutes)
diff --git a/docker-compose.yml b/docker-compose.yml index 76bd9bc71..8aedd281a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -80,6 +80,8 @@ services: - _APP_DB_PASS - _APP_INFLUXDB_HOST - _APP_INFLUXDB_PORT + - _APP_FUNCTIONS_TIMEOUT + - _APP_FUNCTIONS_CONTAINERS appwrite-worker-usage: entrypoint: worker-usage @@ -234,6 +236,8 @@ services: - _APP_DB_SCHEMA - _APP_DB_USER - _APP_DB_PASS + - _APP_FUNCTIONS_TIMEOUT + - _APP_FUNCTIONS_CONTAINERS appwrite-worker-mails: entrypoint: worker-mails