update graceful shutdown

This commit is contained in:
Hongbo Wu
2024-04-09 16:49:03 +08:00
parent f2f18eb12b
commit 5f239d2dcb
5 changed files with 46 additions and 31 deletions

View File

@ -2,11 +2,13 @@ import { ConnectionOptions, Job, QueueEvents, Worker } from 'bullmq'
import { nanoid } from 'nanoid'
import supertest from 'supertest'
import { v4 } from 'uuid'
import { makeApolloServer } from '../src/apollo'
import { createWorker, QUEUE_NAME } from '../src/queue-processor'
import { createApp } from '../src/server'
import { corsConfig } from '../src/utils/corsConfig'
const { app, apollo } = createApp()
const app = createApp()
const apollo = makeApolloServer(app)
export const request = supertest(app)
let worker: Worker
let queueEvents: QueueEvents