mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
11 lines
363 B
TypeScript
11 lines
363 B
TypeScript
import { Worker } from 'bullmq';
|
|
import { RedisHostname, RedisPort } from '../Config';
|
|
|
|
export default class QueueWorker {
|
|
public static getWorker(queueName: string, onJobInQueue: any){
|
|
return new Worker(queueName, onJobInQueue, { connection: {
|
|
host: RedisHostname.toString(),
|
|
port: RedisPort.toNumber()
|
|
}});
|
|
}
|
|
} |