pcdshub / lightpath

LCLS Lightpath Module
https://pcdshub.github.io/lightpath
Other
4 stars 9 forks source link

BUG: Stop GUI from opening twice from `ligthpath` command #149

Closed tangkong closed 2 years ago

tangkong commented 2 years ago

Description

Only run entrypoint once when running the lightpath command from the cli entrypoint.

This is a workaround, honestly. I'm ok with this not being merged until we figure out exactly what's going on, maybe this is just a me problem

Motivation and Context

GUI was opening twice when running the command lightpath from the cli.

For my own understanding:

(pcds-5.4.2)roberttk@psbuild-rhel7-01:~$ lightpath --sim
running file __main__.py, with name: lightpath.__main__
running file main.py, with name: lightpath.main
entrypoint
[2022-08-15 11:16:58] - INFO -  Launching LCLS Lightpath ...
<... clip ...>
entrypoint
[2022-08-15 11:17:10] - INFO -  Launching LCLS Lightpath ...
(pcds-5.4.2)roberttk@psbuild-rhel7-01:~$ python -m lightpath --sim
running file __main__.py, with name: __main__
running file main.py, with name: lightpath.main
entrypoint
[2022-08-15 11:17:24] - INFO -  Launching LCLS Lightpath ...
<... clip ...>
(pcds-5.4.2)roberttk@psbuild-rhel7-01:~$ 

How Has This Been Tested?

Interactively. Both lightpath and python -m lightpath work

Where Has This Been Documented?

This PR

tangkong commented 2 years ago

This was an env issue, old entrypoints being carried over in the prod env