» Shared XMPP connection between Celery workers
Shared XMPP connection between Celery workers
|January 5, 2012
Posted by forumadmin
My web app needs to be able to send XMPP messages (Facebook Chat), and I thought Celery might be a good solution for this. A task would consist of querying the database and sending the XMPP message to a number of users. However, with that approach I would have to connect to the XMPP server every time I run a task, which is not a great idea.
From the Facebook Chat API docs:
- Your Facebook Chat integration should only be used for sessions that are expected to be long-lived. Clients should not rapidly churn on and off.
Is there a way to share an XMPP connection between workers so I don’t have to reconnect every time I want to send a message? Or, is there a better solution?
More Related Questions
- Celery multi with queues set up not receiving tasks from django I am running my workers with the following command:
celery -A myapp multi start 4 -l debug -Q1:3 queue1,queue2 -Q:4 queue3
The workers start out very well so when i run
- Understanding difference between celery and celery milti? When I run Celery with one worker with celery worker -A myapp -l info, everything is fine, tasks are performed.
But when I run celery multi start 2 -Q:1 message_send -Q:2 message_manager […]
- Cancel an already executing task with Celery? I am new to Django and Celery. I have been reading the doc and searching but cannot seem to find a straight answer:
Can you cancel an already executing task? (as in the task has started, […]
- How do I get the thread id of XMPP chat thread? I've implemented an XMPP Facebook chat in a browser and I wish to get the unseen messages on chat thread when I open a chat with a particular user, knowing his uid. I know this can be done […]
- How to send private messages with Facebook API using C# I use Facebook Connect for login on my website and need to create functionality of sending personal messages to user's Facebook friends.
A solution from this question is not suitable for […]
- Facebook chat using Google App Engine(Java) problem Is it possible to send/receive chat messages to Facebook chat using Google App Engine(Java)? I was trying to implement this functionality for a whole week. I read the XMPP Doc in GAE, but […]
- Integrate Facebook chat in android with Asmack API I try to implement chat support as suggested in this blog.
Currently, I'm using following code to implement chatting interface.
- Facebook XMPP Chat API send Message PHP Hello Stackoverflow Community,
I am currently messing about with the Facebook Chat API. I want to send chat messages to my facebook contacts via an App.
Using the example provided by […]
- How to force import a lib from python site-package? I am using custom django struct as below:
all settings file in conf, all app in src
and need use below manage.py:
if __name__ == "__main__":
ROOT_PATH = […]
- Real-time update the online_presence for a users friends, using FQL/Chat API I'm currently developing an app in facebook which has a list of friends of the user logged in and shows their online presence. To get this, I used the following FQL query: