Replies: 3 comments
-
@jaraco may have an idea if this is reasonable or if something else should be done. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I took a brief look and don't have much to add. What you are trying to do sounds sane. I don't understand enough of the Celery internals to make a good assessment on that, but I wish you luck. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The thought I had last night was if signals were getting in the way. Is the API I'm using in Celery registering signal handlers that CherryPy |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Checklist
for similar or identical bug reports.
for existing proposed fixes.
to find out if the bug was already fixed in the master branch.
(If there are none, check this box anyway).
Related Issues and Possible Duplicates
I've not found any documentation on embedding Celery Workers into my Python program. Everything so far has been extending workers to add functionality when the workers start or stop. The closest thing I found was the Py.Test
celery/contrib/testing/app.py
code but I couldn't figure out how, the setup I've got is similar.Related Issues
Possible Duplicates
Description
I'm trying to embed Celery into a CherryPy server. I'm not looking for a lot of concurrency. So, a single process multi-threaded application is desirable for long running tasks that won't return in a reasonable time for web applications.
It seems like both frameworks have good extending documentation with very similar usage patterns. So the reverse could be asked as well, how do I embed a CherryPy server into Celery?
Here's the code I have so far.
I'm using
memory:///
for mybroker_url
similar to the Py.Test integration. The problem is shutdown is not clean. The main script runs and brings up both CherryPy and Celery, when I hit Ctrl-C CherryPy handles the shutdown sequence. Theworker.run()
method doesn't seem to return to stop the worker thread.I've tried various ways to issue the worker shutdown and none of them seem to make
worker.run()
return.Suggestions
It would be nice to have some good documentation on how to embed Celery properly in another application. CherryPy does have similar docs and I've followed them to success embedding CherryPy into specialized Python applications.
Some things to consider:
Beta Was this translation helpful? Give feedback.
All reactions