Remove await (#2941)

* Remove await

* Remove async

* Remove await server
This commit is contained in:
Bruce Berrios 2022-05-05 11:13:09 -04:00 committed by GitHub
parent 88a587c5c2
commit 38ed2f60aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -38,7 +38,7 @@ async function bootServer(port: number): Promise<Server> {
Logger.success("Connected to redis");
Logger.info("Initializing task queues...");
await initJobQueue(RedisClient.getConnection());
initJobQueue(RedisClient.getConnection());
Logger.success("Task queues initialized");
}

View file

@ -18,9 +18,7 @@ function buildGeorgeTask(command: string, taskArguments: any[]): GeorgeTask {
let jobQueue: Queue;
let jobQueueScheduler: QueueScheduler;
export async function initJobQueue(
redisConnection: IORedis.Redis | undefined
): Promise<void> {
export function initJobQueue(redisConnection: IORedis.Redis | undefined): void {
if (jobQueue || !redisConnection) {
return;
}
@ -42,7 +40,7 @@ export async function initJobQueue(
autorun: false,
connection: redisConnection,
});
await jobQueueScheduler.run();
jobQueueScheduler.run();
}
async function addToQueue(command: string, task: GeorgeTask): Promise<void> {