Enable %Ensemble/%Production/ModifyConfiguration in System Audit Events:
.png)
After that you should see these events:
.png)
- Log in to post comments
Enable %Ensemble/%Production/ModifyConfiguration in System Audit Events:
.png)
After that you should see these events:
.png)
Audit table contains all production item changes you can query it once every X minutes/hours to get new changes.
%objlasterror is %Status which is a binary format. You can store it in a property of a %Status type and use ODBC mode for SQL queries, or use $system.Status.DisplayError(sc) to get/store the display value.
Try to export the project with one deployed class. Open exported xml and check if the class is there and deployed.
No, should be the same. Do you see (deployed) classes in Studio/VSCode?
Use args... to supply a variable number of parameters:
ClassMethod DoCleverStuf(args...) As %Status [ CodeMode = objectgenerator ]
{
do %code.WriteLine(" For i=1:1:args {")
do %code.WriteLine(" Write args(i)")
do %code.WriteLine(" }")
do %code.WriteLine(" Set tSC = $$$OK")
...
}can I generate a whole method at compile time?
You can use projections to do that. Here's an example.
Some solutions are just too creative!
Only the pyramid characters count, having (or not having) white spaces at the end is not important.
Test cases do have them, but if you shorten the solution and it outputs the pyramid without white spaces after the hashtag that's great too.
Assuming you have a sync mirror established, adding new db to mirror is as simple as:
Please note that some methods accept db name, most accept db directory, and others db sfn. Please keep that in mind.
Eduard, Is the rate at which one BS can process known or is it variable based on data unit to be processed?
It is variable based on data unit to be processed. Data unit (file) size varies between 1Kb and 100Mb.
Similarly is the rate of arrival known or possible to detect?
IRIS BS pulls messages, so as soon as BS job is done with the message, next message is pulled from the external queue (AWS SQS).
Is the design to have all the processing of a data unit in the BS rather than pass to a BP/BO?
Yes, it's a stateless app, so I need to process message and report success/error immediately since container can be reprovisioned at any time.
CPU utilization would likely depend on the number of workers, wouldn't it?
It sure does. Question is how to scale workers to optimize queue consumption
Go to the SMP -> System Administration -> Configuration -> National Language Settings -> Locale Definitions and compare selected locales.
Try: ##class(%Studio.Project).InstallFromFile( "/display=none /displaylog=0 /displayerror=0")
The simpliest solution would be to call RestartWebServer as a final step of your deployment pipeline.
Do you mean Application Error Log?
.png)
Yes, like that.
Is it the same OS?
You can also try running:
openssl s_client -connect <URL or IP>:<port>Would it work with Enabled cipherlist (TLSv1.2 and below): ALL
Can you set Maximum Protocol Version to TLSv1.3?
As process spawning is expensive, parallel queries are processed using Work Queue Manager. It works by having a queue managing process spawn worker processes at the system startup. When a new parallel query needs to be executed, it is distributed to workers.
That is why the $zparent value is not what you expected. It is a value of a work queue managing process.
You can use it instead, as it's relatively constant.
Before executing your main query, run this query to get Work Queue Manager JobId:
Class Test.Parallel
{
Query Test() As %SQLQuery
{
SELECT Test.Parallel_Parent() UNION %PARALLEL
SELECT Test.Parallel_Parent()
}
ClassMethod Parent() As %Integer [ CodeMode = expression, SqlProc ]
{
$zparent
}
/// do ##class(Test.Parallel).Try()
ClassMethod Try()
{
set rs = ..TestFunc()
do rs.%Next()
write "Work Queue Manager Job: ", rs.%GetData(1)
}
}
Then, store your data subscribed by Work Queue Manager JobId, and all Work Queue Workers can pick it up using $zparent.
IIS can't access <IRIS>\CSP\bin\CSP.ini.
You can make IRISLIB DB RW, but you'll lose changes on update.
Parameter values are static values* and the same for all objects.
Property values are different for each object.
Small example:
Class Circle Extends %RegisteredObject {
Parameter PI = 3.14;
Property Radius;
Method GetArea()
{
quit ..#PI * ..Radius * ..Radius
}
ClassMethod Test()
{
set circle = ..%New()
set circle.Radius = 25
write circle.GetArea()
}
}* parameters can be calculated but not set by user.
Checking every 5 seconds should be good enough I think (with 10 being a default timeout in several places).
This is actually for a PEX adapter but it looks like a fast check.
Thank you! That is exectly what I need.
Database is a physical file containing globals.
Namespace is a logical combination of one or more databases.
By default Namespace has two databases:
In addition to that, namespace can have any amount of mappings. Mappings map specified globals/code from a specified database.
When you try to access a global, first global mappings are searched for this global, if no mappings are found, the GLOBALS database is used.
When you try to access some code, first package/routine mappings are searched for this code, if no mappings are found, the ROUTINES database is used.
To split data innto a separate DB:
scheduled task that run every 5 mins
Assuming task is scheduled like this:
.png)
it would be scheduled to run again 5 minutes after the completion of a last task execution, so there's no issue with several copies of a task running in parallel.
I would not recommend regexp for that. If you have one place with such a date, you can use transient/calculated property pair:
Class User.JSON Extends (%RegisteredObject, %JSON.Adaptor)
{
Property tsjson As %String(%JSONFIELDNAME = "ts") [ Transient ];
Property ts As %TimeStamp(%JSONINCLUDE = "none") [ SqlComputeCode = {set {*}=$replace({tsjson}," ", "T")_"Z"}, SqlComputed ];
/// d ##class(User.JSON).Test()
ClassMethod Test()
{
set json = {"ts":"2022-02-02 01:01:34"}
set obj = ..%New()
zw obj.%JSONImport(json)
w "ts:" _ obj.ts
}
}
If you have a lot of json properties, use a custom datatype to do automatic conversion:
Class User.JSONTS Extends %Library.TimeStamp
{
ClassMethod IsValidDT(%val As %RawString) As %Status
{
/// replace it with a real check
q $$$OK
}
/// Converts the Objectscript value to the JSON number value.
ClassMethod JSONToLogical(%val As %Decimal) As %String [ CodeMode = generator, ServerOnly = 1 ]
{
/// $replace({tsjson}," ", "T")_"Z"
If 1,($$$getClassType(%class)=$$$cCLASSCLASSTYPEDATATYPE) || $$$comMemberKeyGet(%class,$$$cCLASSparameter,"%JSONENABLED",$$$cPARAMdefault) {
Set %codemode=$$$cMETHCODEMODEEXPRESSION
Set %code="$replace(%val,"" "", ""T"")_""Z"""
} Else {
Set %code=0
}
Quit $$$OK
}
}And use it instead of the standard timestamp:
Class User.JSON Extends (%RegisteredObject, %JSON.Adaptor)
{
Property ts As User.JSONTS;
/// d ##class(User.JSON).Test()
ClassMethod Test()
{
set json = {"ts":"2022-02-02 01:01:34"}
set obj = ..%New()
zw obj.%JSONImport(json)
w "ts:" _ obj.ts
}
}
You can do it like this:
1. Get active production:
w ##class(EnsPortal.Utils).GetCurrentProductionName()2. Get a list of all BSes in an active production:
SELECT i.Name
FROM Ens_Config.Item i
JOIN %Dictionary.ClassDefinition_SubclassOf('Ens.BusinessService') c ON c.Name = i.ClassName
WHERE Production = ?3. Disable all BSes (info)
for stop = 1, 0 {
for i=1:1:$ll(bhList) {
set host = $lg(bhList, i)
set sc = ##class(Ens.Director).TempStopConfigItem(host, stop, 0)
}
set sc = ##class(Ens.Director).UpdateProduction()
}4. Wait for all queues to empty:
SELECT TOP 1 1 AS "Processing"
FROM Ens.Queue_Enumerate()
WHERE "Count">05. Check that there are no active async BPs (extent size of all BPs must be 0 - here's an example)
6. Stop the production.
w ##class(Ens.Director).StopProduction()After that and assuming deferred sending is not used (docs) it would be guaranteed that there are no in-flight messages.
IIS?