From 0c6d1d54df80b79359bf258ca88f38477757d7c2 Mon Sep 17 00:00:00 2001 From: Sam Gamgee Date: Mon, 17 Apr 2017 13:32:22 +1000 Subject: [PATCH] Installer Bugfix --- cls/kutac/monitor/utils/Installer.cls.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cls/kutac/monitor/utils/Installer.cls.xml b/cls/kutac/monitor/utils/Installer.cls.xml index 8738018..0ae1e14 100644 --- a/cls/kutac/monitor/utils/Installer.cls.xml +++ b/cls/kutac/monitor/utils/Installer.cls.xml @@ -127,6 +127,7 @@ do ##class(kutac.monitor.utils.Installer).setup(.pVars) set tApplication = ##class(Security.Applications).%OpenId("/csp/"_$ZCONVERT(namespace, "L"),,.tSC) if $$$ISERR(tSC) { + do $system.Status.DisplayError(tSC) quit } @@ -135,6 +136,8 @@ do ##class(kutac.monitor.utils.Installer).setup(.pVars) } catch e { set tSC = e.AsStatus() } + + do $system.Status.DisplayError(tSC) quit tSC ]]> @@ -517,15 +520,18 @@ do ##class(kutac.monitor.utils.Installer).setup(.pVars) do ..WriteLog("Starting Monitor") set st3 = ..RunningMonitor() - &sql(select Name from %SYS.Task where Name = 'Rebuild SYSMON Cubes') + &sql(select id into :TaskID from %SYS.Task where Name = 'Rebuild SYSMON Cubes') Do tInstaller.PopNS() Do tInstaller.PushNS(Namespace) - if +SQLCODE - { + if +SQLCODE { do ..WriteLog("Creating Task") Do ##class(kutac.monitor.task.Builder).Setup() + } else { + do ##class(%SYS.Task).Resume(TaskID) + do ##class(%SYS.Task).RunNow(TaskID) } + Do tInstaller.PopNS() set st = $$$ADDSC(st2, st3)