mirror of
https://github.com/ansible/awx.git
synced 2026-02-16 10:40:01 -03:30
Merge branch 'fix_fact_caching' into devel
* fix_fact_caching: Convert the fact data structure to the right type Fixing up fact cachine related unit tests Port fact caching system to rabbitmq
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
# All Rights Reserved.
|
||||
|
||||
# Python
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
|
||||
@@ -12,37 +11,7 @@ from django.conf import settings
|
||||
# Kombu
|
||||
from kombu import Connection, Exchange, Producer
|
||||
|
||||
__all__ = ['FifoQueue', 'CallbackQueueDispatcher']
|
||||
|
||||
|
||||
# TODO: Figure out wtf to do with this class
|
||||
class FifoQueue(object):
|
||||
"""An abstraction class implemented for a simple push/pull queue.
|
||||
|
||||
Intended to allow alteration of backend details in a single, consistent
|
||||
way throughout the Tower application.
|
||||
"""
|
||||
def __init__(self, queue_name):
|
||||
"""Instantiate a queue object, which is able to interact with a
|
||||
particular queue.
|
||||
"""
|
||||
self._queue_name = queue_name
|
||||
|
||||
def __len__(self):
|
||||
"""Return the length of the Redis list."""
|
||||
#return redis.llen(self._queue_name)
|
||||
return 0
|
||||
|
||||
def push(self, value):
|
||||
"""Push a value onto the right side of the queue."""
|
||||
#redis.rpush(self._queue_name, json.dumps(value))
|
||||
|
||||
def pop(self):
|
||||
"""Retrieve a value from the left side of the queue."""
|
||||
#answer = redis.lpop(self._queue_name)
|
||||
answer = None
|
||||
if answer:
|
||||
return json.loads(answer)
|
||||
__all__ = ['CallbackQueueDispatcher']
|
||||
|
||||
|
||||
class CallbackQueueDispatcher(object):
|
||||
|
||||
Reference in New Issue
Block a user