-
+
-
+
Houston we have a problem!
--
+
diff --git a/hosting/single/runner.sh b/hosting/single/runner.sh
index 770b23eec1..9dc7aa25d8 100644
--- a/hosting/single/runner.sh
+++ b/hosting/single/runner.sh
@@ -77,7 +77,7 @@ mkdir -p ${DATA_DIR}/minio
chown -R couchdb:couchdb ${DATA_DIR}/couch
redis-server --requirepass $REDIS_PASSWORD > /dev/stdout 2>&1 &
/bbcouch-runner.sh &
-minio server --console-address ":9001" ${DATA_DIR}/minio > /dev/stdout 2>&1 &
+/minio/minio server --console-address ":9001" ${DATA_DIR}/minio > /dev/stdout 2>&1 &
/etc/init.d/nginx restart
if [[ ! -z "${CUSTOM_DOMAIN}" ]]; then
# Add monthly cron job to renew certbot certificate
diff --git a/i18n/README.de.md b/i18n/README.de.md
index a2f4c3afb9..17d3d1ebbe 100644
--- a/i18n/README.de.md
+++ b/i18n/README.de.md
@@ -1,6 +1,6 @@
diff --git a/lerna.json b/lerna.json
index f0f51242d1..611cf7d32b 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "2.12.4",
+ "version": "2.13.0",
"npmClient": "yarn",
"packages": [
"packages/*"
diff --git a/package.json b/package.json
index 417fb31e0e..8a27cde104 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
"scripts": {
"preinstall": "node scripts/syncProPackage.js",
"setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn build && yarn dev",
- "build": "lerna run build --stream",
+ "build": "NODE_OPTIONS=--max-old-space-size=1500 lerna run build --stream",
"build:dev": "lerna run --stream prebuild && yarn nx run-many --target=build --output-style=dynamic --watch --preserveWatchOutput",
"check:types": "lerna run check:types",
"build:sdk": "lerna run --stream build:sdk",
diff --git a/packages/backend-core/src/index.ts b/packages/backend-core/src/index.ts
index c7cf9f56cc..ffffd8240a 100644
--- a/packages/backend-core/src/index.ts
+++ b/packages/backend-core/src/index.ts
@@ -30,7 +30,6 @@ export * as timers from "./timers"
export { default as env } from "./environment"
export * as blacklist from "./blacklist"
export * as docUpdates from "./docUpdates"
-export * from "./utils/Duration"
export { SearchParams } from "./db"
// Add context to tenancy for backwards compatibility
// only do this for external usages to prevent internal
diff --git a/packages/backend-core/src/objectStore/utils.ts b/packages/backend-core/src/objectStore/utils.ts
index dba5f3d1c2..4c3a84ba91 100644
--- a/packages/backend-core/src/objectStore/utils.ts
+++ b/packages/backend-core/src/objectStore/utils.ts
@@ -18,8 +18,12 @@ export const ObjectStoreBuckets = {
}
const bbTmp = join(tmpdir(), ".budibase")
-if (!fs.existsSync(bbTmp)) {
+try {
fs.mkdirSync(bbTmp)
+} catch (e: any) {
+ if (e.code !== "EEXIST") {
+ throw e
+ }
}
export function budibaseTempDir() {
diff --git a/packages/backend-core/src/queue/inMemoryQueue.ts b/packages/backend-core/src/queue/inMemoryQueue.ts
index a8add7ecb6..af2ec6dbaa 100644
--- a/packages/backend-core/src/queue/inMemoryQueue.ts
+++ b/packages/backend-core/src/queue/inMemoryQueue.ts
@@ -36,7 +36,7 @@ class InMemoryQueue {
* @param opts This is not used by the in memory queue as there is no real use
* case when in memory, but is the same API as Bull
*/
- constructor(name: string, opts?: any) {
+ constructor(name: string, opts = null) {
this._name = name
this._opts = opts
this._messages = []
diff --git a/packages/backend-core/src/queue/queue.ts b/packages/backend-core/src/queue/queue.ts
index c0d1861de3..0658147709 100644
--- a/packages/backend-core/src/queue/queue.ts
+++ b/packages/backend-core/src/queue/queue.ts
@@ -2,18 +2,11 @@ import env from "../environment"
import { getRedisOptions } from "../redis/utils"
import { JobQueue } from "./constants"
import InMemoryQueue from "./inMemoryQueue"
-import BullQueue, { QueueOptions } from "bull"
+import BullQueue from "bull"
import { addListeners, StalledFn } from "./listeners"
-import { Duration } from "../utils"
import * as timers from "../timers"
-import * as Redis from "ioredis"
-// the queue lock is held for 5 minutes
-const QUEUE_LOCK_MS = Duration.fromMinutes(5).toMs()
-// queue lock is refreshed every 30 seconds
-const QUEUE_LOCK_RENEW_INTERNAL_MS = Duration.fromSeconds(30).toMs()
-// cleanup the queue every 60 seconds
-const CLEANUP_PERIOD_MS = Duration.fromSeconds(60).toMs()
+const CLEANUP_PERIOD_MS = 60 * 1000
let QUEUES: BullQueue.Queue[] | InMemoryQueue[] = []
let cleanupInterval: NodeJS.Timeout
@@ -28,14 +21,7 @@ export function createQueue