smart scanner metrics
This commit is contained in:
@ -2,9 +2,9 @@ Compile function WO_MAT_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
Declare function Database_Services, Error_Services, SRP_Json, SRP_Com, Environment_Services, Logging_Services
|
||||
Declare function Datetime
|
||||
Declare function Datetime, GetTickCount
|
||||
Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_Services, Logging_Services
|
||||
Declare subroutine obj_wo_mat_log, Set_Status
|
||||
Declare subroutine obj_wo_mat_log, Set_Status, Mona_Services
|
||||
|
||||
$insert LOGICAL
|
||||
$Insert APP_INSERTS
|
||||
@ -20,6 +20,13 @@ Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'Missing Signature' : @FM :
|
||||
objSyncLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
IsProd = Environment_Services('IsProd')
|
||||
If IsProd EQ True$ then
|
||||
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_WOMATSERVICES'
|
||||
end else
|
||||
MonaResource = 'GRP_OPENINSIGHT_MES_OP_FE_DEV_WOMATSERVICES'
|
||||
end
|
||||
|
||||
GoToService else
|
||||
Error_Services('Set', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
|
||||
end
|
||||
@ -379,6 +386,9 @@ Service SyncWOMatInvActionsAndSigProfile(WOMatKey)
|
||||
end service
|
||||
|
||||
Service CassetteIsLastInWo(WoMatKey)
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'CassetteIsLastInWo'
|
||||
|
||||
IsLastInWo = False$
|
||||
|
||||
If Unassigned(WoMatKey) or WoMatKey EQ '' or RowExists('WO_MAT', WoMatKey) NE True$ then
|
||||
@ -424,6 +434,9 @@ Service CassetteIsLastInWo(WoMatKey)
|
||||
end
|
||||
|
||||
Response = IsLastInWo
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
end service
|
||||
|
||||
Service SetWoMatVoidFlag(WoMatKey, Username)
|
||||
@ -473,3 +486,4 @@ Service SetWoMatVoidFlag(WoMatKey, Username)
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user