mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-07 17:20:06 -05:00
add factory method
This commit is contained in:
@@ -10,7 +10,12 @@ class PulseQueue {
|
||||
this.appSettings = appSettings;
|
||||
this.pulseQueueHelper = pulseQueueHelper;
|
||||
this.logger = logger;
|
||||
this.init();
|
||||
}
|
||||
|
||||
static async create({ appSettings, db, pulseQueueHelper, logger }) {
|
||||
const instance = new PulseQueue({ appSettings, db, pulseQueueHelper, logger });
|
||||
await instance.init();
|
||||
return instance;
|
||||
}
|
||||
|
||||
// ****************************************
|
||||
|
||||
Reference in New Issue
Block a user