feat(events): Implement default priority-based event processing (#14476)
* feat(events): Set internal events default priority to lowest, default events to 100 and order placed to 10 * Create swift-months-rush.md * improvements * improvements * improvements * fix condition * doc * fix tests * fix tests --------- Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
43951ce60e
commit
7307a5e63f
@@ -87,3 +87,15 @@ export function buildEventNamesFromEntityName<TNames extends string[]>(
|
||||
|
||||
return events as ReturnType<TNames>
|
||||
}
|
||||
|
||||
export const EventPriority = {
|
||||
CRITICAL: 10,
|
||||
HIGH: 50,
|
||||
DEFAULT: 100,
|
||||
LOW: 500,
|
||||
/**
|
||||
* Lowest priority value supported by BullMQ (2^21)
|
||||
* Internal events use this priority to ensure they don't block critical business events
|
||||
*/
|
||||
LOWEST: 2_097_152,
|
||||
} as const
|
||||
|
||||
Reference in New Issue
Block a user