Fixing issue discovered by tests.
This commit is contained in:
parent
4716eaaab5
commit
1e190886fb
|
@ -22,7 +22,7 @@ export function createQueue<T>(
|
|||
): BullQueue.Queue<T> {
|
||||
const queueConfig: any = redisProtocolUrl || { redis: opts }
|
||||
let queue: any
|
||||
if (env.isTest()) {
|
||||
if (!env.isTest()) {
|
||||
queue = new BullQueue(jobQueue, queueConfig)
|
||||
} else {
|
||||
queue = new InMemoryQueue(jobQueue, queueConfig)
|
||||
|
|
|
@ -20,6 +20,7 @@ import {
|
|||
import { events } from "@budibase/backend-core"
|
||||
import { backups } from "@budibase/pro"
|
||||
import { AppBackupTrigger } from "@budibase/types"
|
||||
import env from "../../../environment"
|
||||
|
||||
// the max time we can wait for an invalidation to complete before considering it failed
|
||||
const MAX_PENDING_TIME_MS = 30 * 60000
|
||||
|
@ -107,10 +108,17 @@ async function deployApp(deployment: any, userId: string) {
|
|||
const devAppId = getDevelopmentAppID(appId)
|
||||
const productionAppId = getProdAppID(appId)
|
||||
|
||||
// can't do this in test
|
||||
if (!env.isTest()) {
|
||||
// trigger backup initially
|
||||
await backups.triggerAppBackup(productionAppId, AppBackupTrigger.PUBLISH, {
|
||||
await backups.triggerAppBackup(
|
||||
productionAppId,
|
||||
AppBackupTrigger.PUBLISH,
|
||||
{
|
||||
createdBy: userId,
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
const config: any = {
|
||||
source: devAppId,
|
||||
|
|
Loading…
Reference in New Issue