Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start services in background with circus 0.17.1 #1147

Open
rominf opened this issue Sep 19, 2020 · 0 comments
Open

Unable to start services in background with circus 0.17.1 #1147

rominf opened this issue Sep 19, 2020 · 0 comments
Labels

Comments

@rominf
Copy link

rominf commented Sep 19, 2020

I use circus as a library to run service in background, and get an error:

from circus import get_arbiter

arbiter = get_arbiter([{"cmd": "sleep 1"}], background=True)
arbiter.start()
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/rominf/.pyenv/versions/3.7.9/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/home/rominf/.pyenv/versions/3.7.9/envs/circus-bug/lib/python3.7/site-packages/circus/arbiter.py", line 826, in run
    return Arbiter.start(self)
  File "/home/rominf/.pyenv/versions/3.7.9/envs/circus-bug/lib/python3.7/site-packages/tornado/gen.py", line 189, in wrapper
    future = _create_future()
  File "/home/rominf/.pyenv/versions/3.7.9/envs/circus-bug/lib/python3.7/site-packages/tornado/gen.py", line 142, in _create_future
    future = Future()  # type: Future
  File "/home/rominf/.pyenv/versions/3.7.9/lib/python3.7/asyncio/events.py", line 644, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-1'.

The same code runs without errors with circus 0.16.1.

@biozz biozz added the bug label Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants