Skip to content

DIRAC_USE_TORNADO_IOLOOP set after Refresher is imported in tornado_start_all #5223

@chrisburr

Description

@chrisburr

In tornado_start_all.py DIRAC_USE_TORNADO_IOLOOP is set in the main function but the DIRACScript import triggers DIRAC.ConfigurationSystem.private.Refresher to be imported which reads this variable at import time.

In [1]: import sys
   ...: assert "DIRAC.FrameworkSystem.Client.MonitoringClient" not in sys.modules
   ...: assert "DIRAC.ConfigurationSystem.private.Refresher" not in sys.modules
   ...: from DIRAC.Core.Utilities.DIRACScript import DIRACScript
   ...: assert "DIRAC.FrameworkSystem.Client.MonitoringClient" not in sys.modules
   ...: assert "DIRAC.ConfigurationSystem.private.Refresher" not in sys.modules
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-1-8197cf08d195> in <module>
      4 from DIRAC.Core.Utilities.DIRACScript import DIRACScript
      5 assert "DIRAC.FrameworkSystem.Client.MonitoringClient" not in sys.modules
----> 6 assert "DIRAC.ConfigurationSystem.private.Refresher" not in sys.modules

AssertionError:

Originally posted by @chrisburr in #5214 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions