From 49d8dd143e33081b00c120466a6d4cbd8d8dfdec Mon Sep 17 00:00:00 2001 From: Thomas Herve Date: Tue, 13 Sep 2016 10:39:06 +0200 Subject: [PATCH] Remove small duplication from message storage There is some duplicate code in mongodb message storage code, which now leaves in the queue module. Let's remove it. Change-Id: Ib95b8fd6ad1afa284b0865e6af7461e666fb0e11 --- zaqar/storage/mongodb/messages.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/zaqar/storage/mongodb/messages.py b/zaqar/storage/mongodb/messages.py index 22b0b4e0c..ede09e839 100644 --- a/zaqar/storage/mongodb/messages.py +++ b/zaqar/storage/mongodb/messages.py @@ -988,19 +988,6 @@ def _basic_message(msg, now): } -# NOTE(kgriffs): E.g.: 'queuecontroller:exists:5083853/my-queue' -_QUEUE_CACHE_PREFIX = 'queuecontroller:' - -_QUEUE_CACHE_TTL = 5 - - -def _queue_exists_key(queue, project=None): - # NOTE(kgriffs): Use string concatenation for performance, - # also put project first since it is guaranteed to be - # unique, which should reduce lookup time. - return _QUEUE_CACHE_PREFIX + 'exists:' + str(project) + '/' + queue - - class MessageQueueHandler(object): def __init__(self, driver, control_driver):