-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(worker): singleton queue and fix inject issues with queues a…
…nd workers (#4929) * refactor(worker): singleton queue and fix inject issues * fix: tests * fix: tests for ws * fix: ws service bootstrap * fix: ws socket initialization * fix: inbound mail service * fix: ws tests * fix: inbound mail * fix: tests * refactor: extract active workers * fix: remove test * fix: worker test * feat: add cluster retry strategt * fix: queue for api * refactor: remove baseapi queues * fix: remove other queu module instances * fix: remove log * fix: remove unused inboud parse worker service * fix: use app shutdown toclose redis * fix: dedicate memory instance for workers * fix: flaky test * refactor: rename active workers naming * fix: pr refactor * revert: worker creation * feat: add types to worker init config --------- Co-authored-by: Gosha <[email protected]>
- Loading branch information
1 parent
3e9ec4e
commit b5e152f
Showing
77 changed files
with
679 additions
and
926 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
import { BullMqService, InboundParseQueueService, QueueBaseOptions } from '@novu/application-generic'; | ||
import { | ||
BullMqService, | ||
InboundParseQueueService, | ||
QueueBaseOptions, | ||
WorkflowInMemoryProviderService, | ||
} from '@novu/application-generic'; | ||
import { JobTopicNameEnum } from '@novu/shared'; | ||
|
||
export class InboundMailService { | ||
public inboundParseQueueService: InboundParseQueueService; | ||
|
||
private workflowInMemoryProviderService: WorkflowInMemoryProviderService; | ||
constructor() { | ||
this.inboundParseQueueService = new InboundParseQueueService(); | ||
this.workflowInMemoryProviderService = new WorkflowInMemoryProviderService(); | ||
this.inboundParseQueueService = new InboundParseQueueService(this.workflowInMemoryProviderService); | ||
} | ||
|
||
async start() { | ||
await this.workflowInMemoryProviderService.initialize(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.