IO-3166-Global-Notifications-Part-2 - Checkpoint
This commit is contained in:
@@ -29,7 +29,10 @@ const FILTER_SELF_FROM_WATCHERS = process.env?.FILTER_SELF_FROM_WATCHERS !== "fa
|
||||
*/
|
||||
const scenarioParser = async (req, jobIdField) => {
|
||||
const { event, trigger, table } = req.body;
|
||||
const { logger } = req;
|
||||
const {
|
||||
logger,
|
||||
sessionUtils: { getBodyshopFromRedis }
|
||||
} = req;
|
||||
|
||||
// Step 1: Validate we know what user committed the action that fired the parser
|
||||
// console.log("Step 1");
|
||||
@@ -118,12 +121,15 @@ const scenarioParser = async (req, jobIdField) => {
|
||||
// Step 7: Identify scenarios that match the event data and job context
|
||||
// console.log("Step 7");
|
||||
|
||||
const matchingScenarios = getMatchingScenarios({
|
||||
...eventData,
|
||||
jobWatchers,
|
||||
bodyShopId,
|
||||
bodyShopName
|
||||
});
|
||||
const matchingScenarios = await getMatchingScenarios(
|
||||
{
|
||||
...eventData,
|
||||
jobWatchers,
|
||||
bodyShopId,
|
||||
bodyShopName
|
||||
},
|
||||
getBodyshopFromRedis
|
||||
);
|
||||
|
||||
// Exit early if no matching scenarios are identified
|
||||
if (isEmpty(matchingScenarios)) {
|
||||
|
||||
Reference in New Issue
Block a user