From f3ad7adfa8f147b2eaf7eef2d64f09bca6195883 Mon Sep 17 00:00:00 2001 From: Chase Tucker Date: Wed, 4 Jun 2025 11:09:43 -0700 Subject: [PATCH] Move MonIn calls to background --- LSL2/STPROC/MONA_SERVICES.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/LSL2/STPROC/MONA_SERVICES.txt b/LSL2/STPROC/MONA_SERVICES.txt index 7e1ecb8..c1d7223 100644 --- a/LSL2/STPROC/MONA_SERVICES.txt +++ b/LSL2/STPROC/MONA_SERVICES.txt @@ -18,7 +18,7 @@ Parm3: -For Metric updates this represents the numeric data that you wish to send. ***************************************************************/ -Declare Subroutine Errmsg, Error_Services, Delay, Mona_Services +Declare Subroutine Errmsg, Error_Services, Delay, Mona_Services, Service_Services Declare function Get_Status, SRP_Datetime, Environment_Services, Httpclient_Services #pragma precomp SRP_PreCompiler @@ -44,17 +44,23 @@ Options STATES = 'OK', 'WARNING', 'CRITICAL' Service SendStatus(MonitorName=MONITORS, StatusName, CurrentState=STATES) - Mona_Services("SendBufferedStatus", MonitorName, StatusName, CurrentState) + Mona_Services("PostStatus", MonitorName, StatusName, CurrentState) end service +Service PostStatus(MonitorName, StatusName, CurrentState=STATES) + Service_Services('PostProcedure', 'MONA_SERVICES', 'SendBufferedStatus':@VM:MonitorName:@VM:StatusName:@VM:CurrentState) +end service Service SendMetric(MonitorName=MONITORS, MetricName, Number) - Mona_Services("SendBufferedAverageMetric", MonitorName, MetricName, Number) + Mona_Services("PostAverageMetric", MonitorName, MetricName, Number) end Service +Service PostAverageMetric(MonitorName, MetricName, Number) + Service_Services('PostProcedure', 'MONA_SERVICES', 'SendBufferedAverageMetric':@VM:MonitorName:@VM:MetricName:@VM:Number) +end service Service SendBufferedStatus(MonaResource, StatusName, StatusValue) @@ -195,3 +201,4 @@ SwapResourceNames: return +