@budibase/worker 2.4.27-alpha.7 → 2.4.27-alpha.8
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 +6 -6
- package/scripts/test.sh +3 -3
- package/src/index.ts +2 -0
- package/src/tests/TestConfiguration.ts +2 -0
- package/src/tests/jestEnv.ts +1 -0
- package/src/tests/jestSetup.ts +5 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/worker",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.4.27-alpha.
|
|
4
|
+
"version": "2.4.27-alpha.8",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"author": "Budibase",
|
|
37
37
|
"license": "GPL-3.0",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@budibase/backend-core": "2.4.27-alpha.
|
|
40
|
-
"@budibase/pro": "2.4.27-alpha.
|
|
41
|
-
"@budibase/string-templates": "2.4.27-alpha.
|
|
42
|
-
"@budibase/types": "2.4.27-alpha.
|
|
39
|
+
"@budibase/backend-core": "2.4.27-alpha.8",
|
|
40
|
+
"@budibase/pro": "2.4.27-alpha.7",
|
|
41
|
+
"@budibase/string-templates": "2.4.27-alpha.8",
|
|
42
|
+
"@budibase/types": "2.4.27-alpha.8",
|
|
43
43
|
"@koa/router": "8.0.8",
|
|
44
44
|
"@sentry/node": "6.17.7",
|
|
45
45
|
"@techpass/passport-openidconnect": "0.3.2",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"typescript": "4.7.3",
|
|
102
102
|
"update-dotenv": "1.1.1"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "daeec6f5201291037b1ba89e7db3b587a09bd2e1"
|
|
105
105
|
}
|
package/scripts/test.sh
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
if [[ -n $CI ]]
|
|
4
4
|
then
|
|
5
5
|
# --runInBand performs better in ci where resources are limited
|
|
6
|
-
echo "jest --coverage --runInBand"
|
|
7
|
-
jest --coverage --runInBand
|
|
6
|
+
echo "jest --coverage --runInBand --forceExit"
|
|
7
|
+
jest --coverage --runInBand --forceExit
|
|
8
8
|
else
|
|
9
9
|
# --maxWorkers performs better in development
|
|
10
10
|
echo "jest --coverage --maxWorkers=2"
|
|
11
11
|
jest --coverage --maxWorkers=2
|
|
12
|
-
fi
|
|
12
|
+
fi
|
package/src/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
middleware,
|
|
22
22
|
queue,
|
|
23
23
|
env as coreEnv,
|
|
24
|
+
timers,
|
|
24
25
|
} from "@budibase/backend-core"
|
|
25
26
|
db.init()
|
|
26
27
|
import Koa from "koa"
|
|
@@ -91,6 +92,7 @@ server.on("close", async () => {
|
|
|
91
92
|
}
|
|
92
93
|
shuttingDown = true
|
|
93
94
|
console.log("Server Closed")
|
|
95
|
+
timers.cleanup()
|
|
94
96
|
await redis.shutdown()
|
|
95
97
|
await events.shutdown()
|
|
96
98
|
await queue.shutdown()
|
package/src/tests/jestEnv.ts
CHANGED
package/src/tests/jestSetup.ts
CHANGED
|
@@ -2,7 +2,7 @@ import "./logging"
|
|
|
2
2
|
|
|
3
3
|
import { mocks, testContainerUtils } from "@budibase/backend-core/tests"
|
|
4
4
|
import env from "../environment"
|
|
5
|
-
import { env as coreEnv } from "@budibase/backend-core"
|
|
5
|
+
import { env as coreEnv, timers } from "@budibase/backend-core"
|
|
6
6
|
|
|
7
7
|
// must explicitly enable fetch mock
|
|
8
8
|
mocks.fetch.enable()
|
|
@@ -21,3 +21,7 @@ if (!process.env.CI) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
testContainerUtils.setupEnv(env, coreEnv)
|
|
24
|
+
|
|
25
|
+
afterAll(() => {
|
|
26
|
+
timers.cleanup()
|
|
27
|
+
})
|