· Apr 6, 2018

EnableConfigItem() scripting

We have scripted a process where we can run EnableConfigItem from the cron in AIX so we can run multiple scripts at a time vs the scheduler in Ensemble that is single threaded. For the most part this works fine, until that service/operation has an error on it then it seems that everything else that is called after that instance halts.

Is there something that is stopping EnsConfigItem() from running once something has error'd?

Can something be forced like it does if we try to enable/disable in the gui and it times out?

this is the single command line we are calling

zn "$1"
w ##class(Ens.Director).EnableConfigItem("$2", 1, 1)


Scott Roth

Discussion (3)2
Log in or sign up to continue

Using the Ensemble Scheduler we ran into issues when we had multiple schedules running at the same time, and notice it pausing the whole environment just to refresh. That's why we went down this route.

It looks like this particular Inbound.SQL.Adapter service that caused the issue had a data lock on the database which caused more issues. So I am wondering if the data lock caused EnsConfigItem() to get in a hung status.

If you want to enable/disable/modify several ensemble hosts, it's better to update them without updating production first and after that update production. Maybe your error is caused by racing production updates. Also add longer timeout on production update.

set sc = ##class(Ens.Director).EnableConfigItem("Item1", 1, 0)
write:'sc $System.Status.GetErrorText(sc)
set sc = ##class(Ens.Director).EnableConfigItem("Item2", 1, 0)
write:'sc $System.Status.GetErrorText(sc)
set sc = ##class(Ens.Director).UpdateProduction(60)
write:'sc $System.Status.GetErrorText(sc)