From 0331c738361dc4f9e330323eba6a43982c56dfd8 Mon Sep 17 00:00:00 2001 From: jpsider Date: Sun, 8 Oct 2017 22:00:47 -0400 Subject: [PATCH] #59 - Queue and TestRun Managers are now reporting heartbeat. --- Queue_Manager/queueManager.ps1 | 4 ++++ TestRun_Manager/TestRun_Manager.ps1 | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Queue_Manager/queueManager.ps1 b/Queue_Manager/queueManager.ps1 index a2cdab3..072b2a9 100644 --- a/Queue_Manager/queueManager.ps1 +++ b/Queue_Manager/queueManager.ps1 @@ -71,6 +71,10 @@ do { $ManagerWait = $ManagerData[0].Wait write-log -Message "Manager Status is : ${ManagerStatus}" -Logfile $logfile write-log -Message "Manager Wait is : ${ManagerWait}" -Logfile $logfile + Write-Log -Message "Updating HeartBeat" -Logfile $logfile + $CurrentHeartBeat = get-date + $query = "update queue_manager set heartbeat='$CurrentHeartBeat' where ID like '1'" + Invoke-MySQLQuery -Query $query -ConnectionString $MyConnectionString #################################### # Set Status to Starting up diff --git a/TestRun_Manager/TestRun_Manager.ps1 b/TestRun_Manager/TestRun_Manager.ps1 index 9ed46cd..35927fa 100644 --- a/TestRun_Manager/TestRun_Manager.ps1 +++ b/TestRun_Manager/TestRun_Manager.ps1 @@ -75,6 +75,10 @@ do { write-log -Message "TestRun Manager Status is : ${TestRunManagerStatus}" -Logfile $logfile write-log -Message "TestRun Manager Wait is : ${TestRunManagerWait}" -Logfile $logfile write-log -Message "TestRun Manager Max_Concurrent is : ${TestRunMGR_Max_Concurrent}" -Logfile $logfile + Write-Log -Message "Updating HeartBeat" -Logfile $logfile + $CurrentHeartBeat = get-date + $query = "update testrun_manager set heartbeat='$CurrentHeartBeat' where ID like '$TestRunManagerID'" + Invoke-MySQLQuery -Query $query -ConnectionString $MyConnectionString #################################### # Set Status to Starting up