From eab1ffbe039bd3960b90174d6bf80f4ec4cbcd25 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Sun, 7 Apr 2024 20:24:27 -0400 Subject: [PATCH] #460 cleanup and moved date and time update to be behind UI ready rather than linked --- coordinator/threads.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/coordinator/threads.lua b/coordinator/threads.lua index 255241e..7c849b5 100644 --- a/coordinator/threads.lua +++ b/coordinator/threads.lua @@ -141,14 +141,12 @@ function threads.thread__main(smem) end end - -- iterate sessions + -- iterate sessions and free any closed sessions apisessions.iterate_all() - - -- free any closed sessions apisessions.free_all_closed() - -- update date and time string for main display - if coord_comms.is_linked() then + if renderer.ui_ready() then + -- update clock used on main and flow monitors iocontrol.get_db().facility.ps.publish("date_time", os.date(smem.date_format)) end @@ -253,7 +251,7 @@ function threads.thread__render(smem) log.debug("render thread start") -- load in from shared memory - local crd_state = smem.crd_state + local crd_state = smem.crd_state local render_queue = smem.q.mq_render local last_update = util.time()