mirror of https://github.com/zulip/zulip.git
Use TornadoQueueClient for activity queue when in the tornado process
(imported from commit 93ca4295403786ae26a2f70be17410674e6d053c)
This commit is contained in:
parent
f64bc59dfb
commit
378a8939ec
|
@ -7,7 +7,7 @@ from django.db import transaction, IntegrityError
|
|||
from django.conf import settings
|
||||
import simplejson
|
||||
from zephyr.lib.cache import cache_with_key
|
||||
from zephyr.lib.queue import SimpleQueueClient
|
||||
from zephyr.lib.queue import SimpleQueueClient, TornadoQueueClient
|
||||
from zephyr.lib.timestamp import datetime_to_timestamp
|
||||
from zephyr.lib.cache import user_profile_by_email_cache_key, \
|
||||
user_profile_by_user_cache_key
|
||||
|
@ -40,7 +40,10 @@ if settings.USING_RABBITMQ:
|
|||
# update_active_status also pushes to rabbitmq, and we don't
|
||||
# want to log it
|
||||
|
||||
activity_queue = SimpleQueueClient()
|
||||
if settings.RUNNING_INSIDE_TORNADO:
|
||||
activity_queue = TornadoQueueClient()
|
||||
else:
|
||||
activity_queue = SimpleQueueClient()
|
||||
|
||||
def update_user_activity(request, user_profile, client):
|
||||
if request.META["PATH_INFO"] == '/json/update_active_status':
|
||||
|
|
Loading…
Reference in New Issue