queue: Rename SimpleQueue to SimpleQueueClient

It doesn't represent a single queue; that's what the 'queue_name' arguments are
for.

(imported from commit 8382ae6793ca7c3ae4b5aacf2c128113a7a88fb6)
This commit is contained in:
Keegan McAllister
2013-01-18 13:01:20 -05:00
parent 2617bbcdff
commit f14db52f22
3 changed files with 5 additions and 5 deletions

View File

@@ -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 SimpleQueue
from zephyr.lib.queue import SimpleQueueClient
from zephyr.lib.timestamp import datetime_to_timestamp
from functools import wraps
@@ -28,7 +28,7 @@ def asynchronous(method):
wrapper.csrf_exempt = True
return wrapper
activity_queue = SimpleQueue()
activity_queue = SimpleQueueClient()
def update_user_activity(request, user_profile, client):
event={'query': request.META["PATH_INFO"],
'user_profile_id': user_profile.id,

View File

@@ -6,7 +6,7 @@ import simplejson
# rabbitmq/pika's queuing system; its purpose is to just provide an
# interface for external files to put things into queues and take them
# out from bots without having to import pika code all over our codebase.
class SimpleQueue(object):
class SimpleQueueClient(object):
connection = None
channel = None
queues = set()

View File

@@ -3,14 +3,14 @@ from django.core.management.base import BaseCommand
import simplejson
import pika
from zephyr.lib.actions import process_user_activity_event
from zephyr.lib.queue import SimpleQueue
from zephyr.lib.queue import SimpleQueueClient
class Command(BaseCommand):
option_list = BaseCommand.option_list
help = "Process UserActivity log messages."
def handle(self, *args, **options):
activity_queue = SimpleQueue()
activity_queue = SimpleQueueClient()
def callback(ch, method, properties, event):
print " [x] Received %r" % (event,)