User bio
404 bio not found
Member since Apr 29, 2019
Posts:
Replies:
Craig Alexander · Jul 13, 2022 go to post

If you wanted it to be abstract/re-usable, maybe something like this?
// Fetch Component Settings
Set tSQL = ##class(%SQL.Statement).%New()
Set tQuery = "Select Top 1 ClassName,Category,PoolSize,Enabled From Ens_Config.Item Where Name = ?"
Set tSC = tSQL.%Prepare(.tQuery)
If 'tSC Quit
Set tResultSet = tSQL.%Execute(tComponent)
Do tResultSet.%Next()
Set tComponentJson.ClassName = tResultSet.%Get("ClassName")
Set tComponentJson.Category = tResultSet.%Get("Category")
Set tComponentJson.PoolSize = tResultSet.%Get("PoolSize")
Set tComponentJson.Enabled = tResultSet.%Get("Enabled")
You could replace the json with the ^global(subscript).  You would probably want to alter the query as well, but I use this to output component statuses to a third party system(hence the json).

Hope this helps!

Craig Alexander · Jun 30, 2020 go to post

Thank you Eduard, this will definitely work for simple tasks as in the example, but I don't think we can account for existing tasks, especially ones with custom parameters.  I believe we're going to have to delete and import them.

Craig Alexander · Mar 30, 2020 go to post

@Dmitry Maslennikov 
We have been attempting to create this ourselves, but we're trying to shrink the size of our build images, and one of the ways we are attempting to accomplish this is to stream the install file from the WRC site instead of hosting it locally and/or ADD-ing it to the image.
We're using code like this:

RUN wget -qO /dev/null --keep-session-cookies --save-cookies /dev/stdout --post-data="UserName=
$WRC_USERNAME&Password=$WRC_PASSWORD" 'https://login.intersystems.com/login/SSO.UI.Logi
n.cls?referrer=https%253A//wrc.intersystems.com/wrc/login.csp' \
 | wget -O - --load-cookies /dev/stdin "https://wrc.intersystems.com/wrc/WRC.StreamServer.cls?F
ILE=/wrc/distrib/$HSAP-2018.1.2.309.5-hscore15.032-b9021-lnxrhx64.tar.gz" \

And this is the error we’re getting:
--2020-03-23 14:48:36--  https://wrc.intersystems.com/wrc/WRC.StreamServer.cls?FILE=/wrc/distrib/-20
18.1.2.309.5-hscore15.032-b9021-lnxrhx64.tar.gz
Resolving wrc.intersystems.com... 38.97.67.139
Connecting to wrc.intersystems.com|38.97.67.139|:443... connected.
HTTP request sent, awaiting response... 404 Stream Not Found
2020-03-23 14:48:37 ERROR 404: Stream Not Found.

Does this method still work for you?
 

Certifications & Credly badges:
Craig has no Certifications & Credly badges yet.
Followers:
Craig has no followers yet.
Following:
Craig has not followed anybody yet.