go to post Lorenzo Scalese · Mar 16, 2023 Thanks you for this tips @Bob Kuszewski Maybe the following line allows to retrieve, but I don't have Windows Docker environment to test myself: Set ip = $SYSTEM.INetInfo.HostNameToAddr("host.docker.internal") @Robert Cemper : If you test this line with Docker for Windows, let me know if It works or not.Thank you.
go to post Lorenzo Scalese · Mar 15, 2023 Hi @Robert Cemper , I already do this with an environment variable passed in the docker-compose file. I don't know if smarter solution exists.
go to post Lorenzo Scalese · Mar 15, 2023 Hi @Iryna Mykhailova!Thank you. This is an interesting example for the community! I have often used this when I need to expose data in SQL only stored in globals (without related class definition). I like the possibility of using the stored procedure "as a table": ClassMethod ShowData() { Set rset = ##class(%SQL.Statement).%ExecDirect(,"SELECT * FROM Sample.Human_GetAllOlderThan(?)",65) Do rset.%Display() } We can further filter the results with a where clause without changing the code of the custom class query.
go to post Lorenzo Scalese · Mar 8, 2023 Hi @Scott Roth , Ten years ago, I implement %ZSTOP routine to execute code when a job process exits or when the instance shutdown. I removed my code, but the routine looks like this: %ZSTOP ; User shutdown routine. Quit SYSTEM ; Cache stopping Set oldNs = $Namespace Try { Set $Namespace = "MYAPPNAMESPACE" ; Do something when stopping the instance. }Catch(ex) {} Set $Namespace = oldNS Quit LOGIN ; a user logs out of Cache (user account or telnet) Quit JOB ; JOB'd process exits. If $Namespace = "MYAPPNAMESPACE" { ; do something when job process exits } Quit CALLIN ; process exits via CALLIN interface. Quit Logit(entrypoint, caller) PRIVATE ; Quit
go to post Lorenzo Scalese · Mar 6, 2023 Hello @Kurt Hofman , I experienced a similar problem the last week while testing a library. To solve it, I created the PYTHONPATH system environment variable with C:\InterSystems\IRISHealth\lib\python\Lib\site-packages\win32;C:\InterSystems\IRISHealth\lib\python\Lib\site-packages\win32\lib. IRIS need to be restarted to consider any change in an environment variable. Check If pythoncom39.dll and pywintypes39.dll exist in the directory C:\InterSystems\IRISHealth\lib\python\Lib\site-packages\win32. If they don't exist, copy them. I don't remember the initial directory of these dll files (maybe C:\InterSystems\IRISHealth\mgr\python\pywin32_system32). I'm a beginner in Python, so maybe a more simple and clean solution exists... Hope this help.
go to post Lorenzo Scalese · Mar 1, 2023 Hi @Scott Roth , The routine ZMIRROR.MAC must be installed in the namespace "%SYS" on each failover member. It needs the IRISLIB database mounted in RW for installation. I use ZMIRROR.MAC to execute code when a node becomes primary, in my example I just implement "NotifyBecomePrimary" label : ZMIRROR Quit NotifyBecomePrimary() New ; https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GHA_mirror#GHA_mirror_set_tunable_params_zmirror_routine Try { Set ns = "MYAPPNAMESPACE" If ##class(Config.Namespaces).Exists(ns) { JOB ##class(pkg.Class).ClassMethod():(ns):2 } } Catch(ex) { } ; just a security Quit:$Quit 1 Quit There are many events available, we can see the list on this documentation page .What event mirror are you interested in?
go to post Lorenzo Scalese · Feb 26, 2023 Hi @Evgeny Shvarov I think the created resource id is in the header response. I don't remember the header name 🤔
go to post Lorenzo Scalese · Feb 25, 2023 Hello @Pietro Montorfano , You can try to write your own export method.Using %Library.RoutineIndex looks good. Example to export all ".MAC" : set tRes = ##class(%SQL.Statement).%ExecDirect(.tStmt,"select name||'.'||type as itemName from %Library.RoutineIndex where type = ? and $Extract(name,1) <> '%'","MAC") While tRes.%Next() { Do $SYSTEM.OBJ.ExportUDL(tRes.%Get("itemName"),"<dir>/"_tRes.%Get("itemName")) }
go to post Lorenzo Scalese · Feb 21, 2023 For adding a member, this is the IP of the first member (primary). It's correct.No matter the virtual IP, it's the role of the arbiter\agent to communicate who is primary in case of a switch. However, a virtual IP is convenient for access to your applications. For example, with web applications: If the system switches from node A to node B, it is more convenient to use a virtual IP address. You can use this in your web server configuration so that it always points to the primary node.
go to post Lorenzo Scalese · Feb 21, 2023 Hi @Scott Roth , I have to search the documentation, but I remember we don't use the virtual IP to set up a mirror member. The DR member knows who is the primary throughout the arbiter\agent.
go to post Lorenzo Scalese · Feb 15, 2023 Hi, This would be an elegant solution rather than adding code to the "ValidateObject" method!
go to post Lorenzo Scalese · Feb 14, 2023 Indeed !The copy paste from google drive create links to my google account ...Thank you for this report I modify that asap.
go to post Lorenzo Scalese · Feb 13, 2023 Congratulations to all! It was a fantastic contest!This is the first time I have seen so many applications.
go to post Lorenzo Scalese · Feb 11, 2023 Thank you @Stefan Cronje ! All contributions are welcome. I will create as soon as possible a list of issues for improvement. People who wish to contribute are welcome.
go to post Lorenzo Scalese · Feb 10, 2023 Thank you for this very interesting post @Stefan Cronje You're right, for example, there are packages today useless because IRIS now provides features. I have a package which I think should be deleted (to discuss with admin). About OpenAPI-Suite, I use a lot of dependencies with packages owned by myself or not to avoid code duplication (for this development I make a pull request to an existing package) A first clean, could be not shown in OpenExchange these dependencies: openapi-client-gen, openapi-server-gen, openapi-common-lib, swagger-validator-cli, swagger-converter-cli. It's useless, peoples need the complete solution, not the dependencies. If we create a larger community package on the "REST" topic, of course, I will contribute to the integration.
go to post Lorenzo Scalese · Feb 9, 2023 Thank you @Evgeny Shvarov ! Could you please consider there is two articles OpenAPI-Suite and the Idea implementation is DPI-I-226
go to post Lorenzo Scalese · Feb 8, 2023 @Gianni Muzzin , If you need it the Introduction to AutoML video is online