mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-09 12:56:07 +08:00
Remove await (#2941)
* Remove await * Remove async * Remove await server
This commit is contained in:
parent
88a587c5c2
commit
38ed2f60aa
2 changed files with 3 additions and 5 deletions
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue