@budibase/worker 3.23.13 → 3.23.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "3.23.13",
4
+ "version": "3.23.15",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -109,5 +109,5 @@
109
109
  }
110
110
  }
111
111
  },
112
- "gitHead": "598d9f4e46f88f589c98cf1a253bf3ac4b9056b1"
112
+ "gitHead": "0d1bff5b5e5f3b1ca5f1ec7180d8becc3a92615c"
113
113
  }
@@ -69,6 +69,11 @@ const environment = {
69
69
  SESSION_EXPIRY_SECONDS: process.env.SESSION_EXPIRY_SECONDS,
70
70
  TOP_LEVEL_PATH: TOP_LEVEL_PATH,
71
71
  EMAIL_TEMPLATE_PATH: process.env.EMAIL_TEMPLATE_PATH,
72
+ // server
73
+ HTTP_SERVER_TIMEOUT_MS: process.env.HTTP_SERVER_TIMEOUT_MS,
74
+ HTTP_HEADERS_TIMEOUT_MS: process.env.HTTP_HEADERS_TIMEOUT_MS,
75
+ HTTP_REQUEST_TIMEOUT_MS: process.env.HTTP_REQUEST_TIMEOUT_MS,
76
+ HTTP_KEEPALIVE_TIMEOUT_MS: process.env.HTTP_KEEPALIVE_TIMEOUT_MS,
72
77
  /**
73
78
  * Mock the email service in use - links to ethereal hosted emails are logged instead.
74
79
  */
package/src/index.ts CHANGED
@@ -97,6 +97,11 @@ app.use(api.routes())
97
97
 
98
98
  const server = http.createServer(app.callback())
99
99
 
100
+ server.timeout = parseInt(env.HTTP_SERVER_TIMEOUT_MS || "60000")
101
+ server.headersTimeout = parseInt(env.HTTP_HEADERS_TIMEOUT_MS || "12000")
102
+ server.requestTimeout = parseInt(env.HTTP_REQUEST_TIMEOUT_MS || "120000")
103
+ server.keepAliveTimeout = parseInt(env.HTTP_KEEPALIVE_TIMEOUT_MS || "15000")
104
+
100
105
  const shutdown = async (signal?: string) => {
101
106
  console.log(
102
107
  `Worker service shutting down gracefully... ${signal ? `Signal: ${signal}` : ""}`