Find

Discussion
· Jun 23

Welcome to Ready 2025!

Welcome everyone!

Hope to meet you here.

Let's have a dedicated discussion thread about Ready 2025. Please post your impressions! Ideas! Inspiration! Photos!

Keynotes are streamed live so even if you're not in Orlando, you can still join!

Discussion (0)1
Log in or sign up to continue
Question
· Jun 23

Best way to "do this after another class compiles"?

I have a class with a projection that creates some persistent classes (chunks) and a non-persistent "Daemon" class that I want to have running in the background, doing some processing. The daemon needs to look at the "chunk" classes, and I want it to be simple to start the daemon -- I am currently calling the daemon's start method at the end of the CreateProjection method. When I do this, I get a <CLASS DOES NOT EXIST> error from the daemon when it tries to query against one of the chunk tables. But, if I add a "HANG 5" at the beginning of the daemon start method, this runs fine. I am assuming this is because the chunk class compilations are being jobbed away, so we fire the daemon start method before the compilations finish. 

"HANG 5" or similar feels like a bandage solution, and with larger projections that need to compile more chunk classes, 5 seconds might not be enough. Is there a way to programmatically "wait for this compilation to be finished and then do a thing?" 

I am also not sure if compilation gets jobbed away, if anyone has any insight into that, that would be wonderful as well.

Please let me know if there is other useful information I can provide. Thank you!

8 Comments
Discussion (8)4
Log in or sign up to continue
Digest
· Jun 23

Publications des développeurs d'InterSystems, semaine Juin 16 - 22, 2025, Résumé

Juin 16 - 22, 2025Week at a GlanceInterSystems Developer Community
Digest
· Jun 23

Nuevas publicaciones en la Comunidad de InterSystems, 16-22 junio

16-22 junioWeek at a GlanceInterSystems Developer Community
Question
· Jun 23

Get Last Message DateTime, Received by Production Component, with ObjectScript code.

Hello, good morning, thank you so much for reading this question. ☺️🙂👍

 

We are developing a code to get information about our Production's items: services, processes and operations.

 

We know we can get various configurations of a given item: Category, Port, Enabled...

 

But we wonder how we could get the date time of the last mesage (most recent) received in an item.

 

To give a code snippet a small section of the code we have developed (and tested), it looks like:

[...]

For i=1:1:tProduction.Items.Count() {
    #dim item as Ens.Config.Item
    set item = tProduction.Items.GetAt(i)
    
    set Componente = ##class(EsquemasDatos.Monitorizacion.Componente).%New()    
    set Componente.Nombre = item.Name
    
    set tipo = item.BusinessType()
    set x = 0
    
    if (tipo = "1") {
        set Componente.Tipo = "Servicio"
        set x = item.GetSetting("Port",.port); 06/02/2024 To get the port of DICOM Services
        
        if (x '= 1){
            set x = item.GetSetting("IPPort",.port) 
        }
        
        
        set Componente.Comentario = item.Comment
        
    if (tipo = "2") {	
        
        [...]
        
    }
    
    [...]
}


[...]

 

We would like to get the date and / or date-time of the most recent message sent to that given item, like the one we see on the Production's menu under "Messages" tab:

 

 

However, how could it be doable?

 

We have looked for similar documentation, threads / questions, but we are unnable to find useful information.

We have looked for:

https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...

https://community.intersystems.com/post/custom-monitoring-page-iris-inte...

https://community.intersystems.com/post/sql-calculate-time-last-message

 

However, we still having the exact same doubt.

Please, could you help us?

Thank you so much! 🙏☺️🙂👍🙏

2 Comments
Discussion (2)3
Log in or sign up to continue