Friday, January 30, 2015

Re: Do Signals block Django process?

Thanks for always answering my questions :)

I did read the documentation on uWSGI and I think I have an understanding now of workers and threads (from Webserver or uWSGI) and how it handles multiple users.

For the signals and badge calculation, I did see celery pop up a couple of times and I did briefly look at their documentation. In theory I don't need this though because when the user submits a form, I want to check for achievements before showing him the results page. If I use celery then it might happen that the new view is rendered while the achievements are still being processed. Maybe I will have to go this route at some point but then I face two new problems (one of which I already have):
a) I need to figure out how to get the request that won a badge in order to send him a message (for this I opened an extra thread)
b) I would need to modify his current view, something like using Websocket. I did a quick google search in the past and apparently using websocket and django is not so easy. So if I can avoid it, I'm happy.

If I know that the signals are processed in sync, and before the new view is rendered, then I can just have the code after the signal check if a badge has been awarded and then render the view. Phew, still quite complicated.

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment