refactored Mona_Services to queue requests and send them in bulk via the Service Manager

Added queue count to mona monitors. Added email notification on ProcessMonaQueue.

Added hard limit of 2000 requests to be sent to MonInBufferedWorker at one time. Fixed outdated Shipment_Services in SharedTest environment.
This commit is contained in:
Infineon\StieberD
2025-06-26 14:34:22 -07:00
parent c6910c14c2
commit 2180ba3fb4
11 changed files with 618 additions and 51 deletions

View File

@ -540,10 +540,10 @@ Service CreateNewOrder(EntityType=ENTITY_TYPES, EntityID, OrderType=ORDER_TYPES,
LogData<2> = Machine
LogData<3> = 'Successfully created Nica order for entity ':EntityType:' ':EntityID:' of type ':OrderType
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
Mona_Services('SendBufferedStatus', MonAResource, StatusName, 'Ok')
Mona_Services('PostStatus', MonAResource, StatusName, 'Ok')
end else
ErrorMsg = 'Error encountered when attempting to create Nica in order for reactor ':ReactNo:' of type ':OrderType
Mona_Services('SendBufferedStatus', MonAResource, StatusName, 'Critical')
Mona_Services('PostStatus', MonAResource, StatusName, 'Critical')
end
end
end else
@ -695,10 +695,10 @@ Service CancelOrder(OrderId)
LogData<2> = Machine
LogData<3> = 'Successfully cancelled Nica order ' : OrderId : ' for reactor ' : ReactNo
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
Mona_Services('SendBufferedStatus', MonAResource, StatusName, 'Ok')
Mona_Services('PostStatus', MonAResource, StatusName, 'Ok')
end else
ErrorMsg = 'Error encountered cancelling Nica order ' : OrderId : ' for reactor ' : ReactNo
Mona_Services('SendBufferedStatus', MonAResource, StatusName, 'Critical')
Mona_Services('PostStatus', MonAResource, StatusName, 'Critical')
end
end else
ErrorMsg = Error_Services('GetMessage')
@ -912,12 +912,12 @@ Service GetOrderStatusUpdate(OrderId)
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
LogData<2> = Machine
LogData<3> = 'Successfully updated Nica order ':OrderId:' for reactor ':ReactNo:'.'
Mona_Services('SendBufferedStatus', MonAResource, StatusName, 'Ok')
Mona_Services('PostStatus', MonAResource, StatusName, 'Ok')
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
end else
Database_Services('ReleaseKeyIDLock', 'NICA_ORDERS', OrderId)
ErrorMsg = 'Error encountered updating Nica order ':OrderId:' for reactor ':ReactNo:'.'
Mona_Services('SendBufferedStatus', MonAResource, StatusName, 'Critical')
Mona_Services('PostStatus', MonAResource, StatusName, 'Critical')
end
end
end else