forked from noxious/server
QueueMangr. async.
This commit is contained in:
parent
8fc194933c
commit
d2c52ea0c0
@ -1,6 +1,5 @@
|
|||||||
import IORedis from 'ioredis';
|
import IORedis from 'ioredis';
|
||||||
import { Job, Queue, Worker } from 'bullmq'
|
import { Job, Queue, Worker } from 'bullmq'
|
||||||
import CharacterJoin from '../events/zone/characterJoin'
|
|
||||||
import config from '../utilities/config'
|
import config from '../utilities/config'
|
||||||
|
|
||||||
class QueueManager {
|
class QueueManager {
|
||||||
@ -8,7 +7,7 @@ class QueueManager {
|
|||||||
public queue!: Queue;
|
public queue!: Queue;
|
||||||
public worker!: Worker;
|
public worker!: Worker;
|
||||||
|
|
||||||
public boot() {
|
public async boot() {
|
||||||
this.connection = new IORedis(config.REDIS_URL, {
|
this.connection = new IORedis(config.REDIS_URL, {
|
||||||
maxRetriesPerRequest: null
|
maxRetriesPerRequest: null
|
||||||
});
|
});
|
||||||
|
@ -64,7 +64,7 @@ export class Server {
|
|||||||
// Load user manager
|
// Load user manager
|
||||||
await UserManager.boot()
|
await UserManager.boot()
|
||||||
|
|
||||||
QueueManager.boot();
|
await QueueManager.boot();
|
||||||
|
|
||||||
// Load zoneEditor manager
|
// Load zoneEditor manager
|
||||||
await ZoneManager.boot()
|
await ZoneManager.boot()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user