Longrunning tcp connections might be an issue. I would definitely try setting it to something lower.
- Log in to post comments
Longrunning tcp connections might be an issue. I would definitely try setting it to something lower.
You need to iterate on value:
// extract json content from the request:
set dynRequestJsonPayload = {}.%FromJSON(%request.Content)
#dim JsonIterator As %Iterator.AbstractIterator
set JsonIterator = dynRequestJsonPayload.%GetIterator()
// iterate on json structure:
if dynRequestJsonPayload '= "" {
while JsonIterator.%GetNext(.key, .value, .NodeType) {
if NodeType = "string" {
do GlobalTrace("NodeType: " _ NodeType _ "; key: " _ key _ "; value: " _ value)
} elseif NodeType = "array" {
// i want to iterate on this array...
// the following line throws the exeception "ERREUR #5002: Erreur ObjectScript: <INVALID OREF>traitementUFI+34^common.REST.1"
set JsonIteratorSecondary = value.%GetIterator()
} else {
// Do something
}
}
}Do you have Stay Connected setting equal to -1? Try setting it to a lower value, i.e. 30.
@Prasanth Annamreddy should be fixed, please check.
We are working on a fix.
Run this query:
SELECT *
FROM Ens_Config.Item
WHERE ClassName = ?Try this in /bin/iris2/mgr/irisodbc.ini:
[ODBC Data Sources]
HL7Interface2=HL7Interface2
[HL7Interface2]
Driver = /usr/lib64/psqlodbcw.so
Setup=/usr/local/lib/libodbcpsqlS.so
Description = HL7 Interface DB
Servername = localhost
Port = 5432
Protocol = 7.4-1
UserName = postgres
Password = <real pw here>
Database = hl7interface
ReadOnly = noAnd restart iris, after that would it connect?
Which version is this?
You might also want to try:
zw c
At the last $piece a delimiter could be 1 instead of "1", no?
Yes, I don't think we saw that on our Code Golfs before.
set b = """Cat"""
Sure thing!
Great article!
I would advice to reuse the client, it will save you a lot of time.
In REST:
ClassMethod init()
{
If '$data(%JDBCGateway) {
Set %JDBCGateway("client") = ##class(%SYS.Python).Import("boto3").client("dynamodb")
Set %JDBCGateway("table") = ..getTable("us-east-2", "mytable")
}
}
ClassMethod getTable(region, tablename) As %SYS.Python [ Language = python ]
{
import json
import boto3
dynamo = boto3.resource("dynamodb", region_name=region)
return dynamo.Table(tablename)
}
ClassMethod writepy(table, pk, sk, msg) [ Language = python ]
{
message_record = {
"PK": pk,
"SK": sk,
"msg": msg
}
table.put_item(Item=message_record)
}
And call writepy, passing %JDBCGateway("table") (or %JDBCGateway("client")).
In interoperability Business Hosts it can look like this:
Class App.BS Extends Ens.BusinessService
{
Parameter ADAPTER = "Ens.InboundAdapter";
Property Adapter As Ens.InboundAdapter;
Property Table As %SYS.Python;
Method OnInit() As %Status
{
Set ..Table = ##class(App.REST).getTable("region", "table")
Quit $$$OK
}
}Also when you're using resource Table instead of client you can use normal JSON and not DynamoDB JSON which makes code more readable and you can also use Dynamic Objects to serialize to json / in python parse it from json to dict and call update.
Yes, that's not possible.
Please move this post to a Job group.
There's an example of that in a sample code.
what is the reason of having nested transactions inside the Worker method?
The idea is to check that TCOMMIT works, for additional safety, but yes, inner pair of TSTART/TCOMMIT can be taken out.
And how can you distribute single ("root") transaction execution and control among several processes?
No problems with that, transaction iterates over history data, so it's possible to chunk it.
another approach
Thank you. Locking situation would be better with this approach.
That won't rollback transactions inside worker processes (as they might be gone by the point we pass sync).
What about the ThrottleDelay setting?
.png)
I think two classes in one namespace have a mismatched value of this setting, rather than plainly incorrect value.
Can you elaborate how are you getting this error?
Try PythonMonkey or Js2Py.
Use source control to store lookup tables and update them only through the CICD process.
This way you can have a full visibility over when the change happened.
I think some parts of EnsLib.File package use filenames as global subscripts. Check $$$ErrorFileTable and similar references in PassthroughService.
Consider upgrading to IRIS.
On Cache 2016.2 you'll need to use iterator to go over all properties and set matching ones.
Sure, check %JSON.Adaptor.
p is ok, quit is ok.
Things like:
ClassMethod ToKeyPad(phrase = {some code to do preprocessing}) As %String
{
Return phrase
}are not okay.