Allow custom timeout
This commit is contained in:
parent
25c16ae229
commit
98702798fb
|
@ -6,6 +6,7 @@ import {
|
|||
getAppMigrationMetadata,
|
||||
updateAppMigrationMetadata,
|
||||
} from "./appMigrationMetadata"
|
||||
import environment from "../environment"
|
||||
|
||||
const appMigrationQueue = queue.createQueue(queue.JobQueue.APP_MIGRATION)
|
||||
appMigrationQueue.process(processMessage)
|
||||
|
@ -15,7 +16,8 @@ export async function runMigration(migrationId: string) {
|
|||
}
|
||||
|
||||
// TODO
|
||||
export const PROCESS_MIGRATION_TIMEOUT = 30000
|
||||
export const PROCESS_MIGRATION_TIMEOUT =
|
||||
environment.APP_MIGRATION_TIMEOUT || 60000
|
||||
|
||||
async function processMessage(job: Job) {
|
||||
const { appId } = job.data
|
||||
|
|
|
@ -87,6 +87,7 @@ const environment = {
|
|||
},
|
||||
TOP_LEVEL_PATH:
|
||||
process.env.TOP_LEVEL_PATH || process.env.SERVER_TOP_LEVEL_PATH,
|
||||
APP_MIGRATION_TIMEOUT: parseIntSafe(process.env.APP_MIGRATION_TIMEOUT),
|
||||
}
|
||||
|
||||
// threading can cause memory issues with node-ts in development
|
||||
|
|
Loading…
Reference in New Issue