Nova postagem

查找

Pergunta
· Jun. 23

HTTP Request not returning data

Hi Guys,

I'm using below to retrieve advertising data from Cassia AC server, but the problem is that its a live connection so the Httprequest.Get(HttpURL) call will hang and doesn't exit & return the data so is there a way for return and after say 30 secs from this live data? or is there something EventSource or something similar where I can pass the URL call then after say 30 secs I can end & exit the call to return the collected data?

  

 BleMac="DC:0D:30:9E:3A:EC",GatewayMac="CC:1B:E0:E2:56:18"
Token=##class(SX3.Task.TemperatureCollection).GetAuth()
Set Httprequest=##class(%Net.HttpRequest).%New()
Set Httprequest.SSLConfiguration="RTLS"
Set Httprequest.Server="MyURL"
Set Httprequest.Timeout=30
Set Httprequest.Https=1
//S Httprequest.WriteTimeout=10
set Httprequest.ContentType="application/json"
Do Httprequest.SetHeader("Accept","application/json")
Do Httprequest.SetHeader("Accept-Language","en_US")
Do Httprequest.SetHeader("Authorization","Bearer "_Token)
Set HttpURL="/api/gap/nodes?filter_mac="_BleMac_"&filter_rssi=-75&mac="_GatewayMac_"&active=1&event=1&chip=1&access_token="_Token
^check("1222")=HttpURL_"|"_Token
Set tSc=Httprequest.Get(HttpURL)
^check("122")=1
^data=Httprequest.HttpResponse.Data.Read(Httprequest.HttpResponse.Data.Size)
//W !,Httprequest.HttpResponse.Data.ReadLine()
//S obj=##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(Httprequest.HttpResponse.Data.Read(Httprequest.HttpResponse.Data.Size),,.list)

here how it looks if I run the URL in the browser

 

 

Thanks

3 novos comentários
Discussão (3)2
Entre ou crie uma conta para continuar
Artigo
· Jun. 22 1min de leitura

python3コマンドでEmbedded Pythonを動かす方法(macOS)

.pyファイルの中でIRISのEmbedded Pythonを動作させる際にirispythonコマンドで実行する方法はドキュメント上で紹介されていましたので、以前より使用していました。

しかし、普通のpythonコマンドを使用するとうまく実行できなかったのですが、最近その謎(原因)が解けたので紹介します。

これは、Mac特有の問題である可能性が高くWindowsやLinuxでは何の問題もなく実行できるのかもしれません。

エラーは以下のようなエラーです。

  File "/opt/iris/lib/python/iris.py", line 34, in <module>
    from pythonint import *
ImportError: IrisSecureStart failed: IRIS_ATTACH (-21)

 

このエラーの原因は、シェルの実行ユーザーとirisのオーナーが異なることが原因とのことです。

Macで普通にIRISをインストールするとそのオーナーはrootです。

従ってpython3コマンドを実行する時にsudoコマンドでrootになる必要があるということです。

そして以下のような環境変数の設定も必要です。

export IRISINSTALLDIR=/opt/iris
export LD_LIBRARY_PATH=$IRISINSTALLDIR/bin:$LD_LIBRARY_PATH
# for MacOS
export DYLD_LIBRARY_PATH=$IRISINSTALLDIR/bin:$DYLD_LIBRARY_PATH
# for IRIS username
export IRISUSERNAME=SuperUser
export IRISPASSWORD=SYS
export IRISNAMESPACE=USER
Discussão (0)1
Entre ou crie uma conta para continuar
InterSystems Oficial
· Jun. 22

适用于 InterSystems IRIS、IRIS for Health、HealthShare HealthConnect 的维护版本 2024.1.4 和 2023.1.6 现已发布

适用于 InterSystems IRIS® 数据平台InterSystems IRIS® for HealthTMHealthShare® Health Connect 的维护版本 2024.1.42023.1.6 现已正式发布 (GA)。 这些版本包含对最近发布的以下提醒的修复 - 提醒:SQL 查询返回错误结果 | InterSystems。 请通过开发者社区分享您的反馈,以便我们可以共同打造更出色的产品。

Discussão (0)0
Entre ou crie uma conta para continuar
Pergunta
· Jun. 21

Where does IRIS Studio save its server connections?

Hi everyone,

I'm preparing to move to a new PC soon and I'm trying to migrate the server connections I use in IRIS Studio to the new environment.

I’ve followed without success an old procedure I've found on a post on the community that involves exporting the registry key from:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Intersystems\Cache\Servers

But I’ve realized that this only includes the entries from the Server Manager and not the actual server connections used within IRIS Studio and shown within the "Server Connections" menu.

As I've done to copy other software configurations, I also checked the following path, but there is no Intersystems or IRIS directory:

C:\Users\<username>\AppData\Roaming\

So I'm wondering where IRIS Studio exactly saves its server connections? Is there a way to export them or copy them to a new machine?

Thanks in advance!

1 novo comentário
Discussão (3)1
Entre ou crie uma conta para continuar
Discussão
· Jun. 21

CreatedAt and LastUpdated - do you use it?

Hi fellow developers!

Curious if you guys use CreatedAt and LastUpdated properties in your classes?

Created to stamp when the record was created and LastUpdated when it was last updated. Where it can be useful - almost everywhere )) I find it convenient in records sorting (e.g. by creation or last update), in sync (with other systems), and so on, for better analytics.

Do you use it all the time for all the classes?

If don't, why not? What do you use instead?

What property type do you use - %TimeStamp? %DateTime?

What is the best practice to have CreatedAt filled automatically during creation and LastUpdated on every successful save (guess it could be in %OnSave)?

Please share your experience /thoughts?

14 novos comentários
Discussão (14)3
Entre ou crie uma conta para continuar