File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ export const createAlerts = async (): Promise<void> => {
6464 async ( alertMap : IAlertMap . IAlertMap ) : Promise < void > => {
6565 const alertMapAccountCode = alertMap . account_code ;
6666 const alertMapZoneName = alertMap . zone_name ;
67+ const alertMapQuantity = alertMap . quantity ;
6768
6869 const fenceTrackerTrigger = await prisma . fence_tracker_triggers . findUnique (
6970 {
@@ -76,7 +77,7 @@ export const createAlerts = async (): Promise<void> => {
7677 }
7778 ) ;
7879
79- const alertMapQuantity = alertMap . quantity ;
80+ const alertMapQuantityMultiple = Math . floor ( alertMapQuantity / EVENTS_COUNT_THRESHOLD ) * EVENTS_COUNT_THRESHOLD ;
8081
8182 const processAlertMap = async ( ) : Promise < void > => {
8283 await prisma . fence_tracker_triggers . create (
@@ -100,9 +101,7 @@ export const createAlerts = async (): Promise<void> => {
100101 params : { instance_id : process . env . CHAT_PRO_INSTANCE_ID }
101102 }
102103 ) ;
103- }
104-
105- const alertMapQuantityMultiple = Math . floor ( alertMapQuantity / EVENTS_COUNT_THRESHOLD ) * EVENTS_COUNT_THRESHOLD ;
104+ } ;
106105
107106 if ( ! fenceTrackerTrigger && alertMapQuantity >= EVENTS_COUNT_THRESHOLD ) {
108107 processAlertMap ( ) ;
You can’t perform that action at this time.
0 commit comments