diff --git a/binary_dependencies/builder/lxc-docker-1.3.2-userns_1.3.2-userns-20141124223407-72690d2-dirty_amd64.deb b/binary_dependencies/builder/lxc-docker-1.3.2-userns_1.3.2-userns-20141124223407-72690d2-dirty_amd64.deb deleted file mode 100644 index a99bcbd4f..000000000 Binary files a/binary_dependencies/builder/lxc-docker-1.3.2-userns_1.3.2-userns-20141124223407-72690d2-dirty_amd64.deb and /dev/null differ diff --git a/data/queue.py b/data/queue.py index aaebcc86b..5c720eed2 100644 --- a/data/queue.py +++ b/data/queue.py @@ -128,8 +128,9 @@ class WorkQueue(object): self._currently_processing = False @staticmethod - def extend_processing(queue_item, seconds_from_now, retry_count=None, + def extend_processing(queue_item_info, seconds_from_now, retry_count=None, minimum_extension=MINIMUM_EXTENSION): + queue_item = QueueItem.get(QueueItem.id == queue_item_info.id) new_expiration = datetime.utcnow() + timedelta(seconds=seconds_from_now) # Only actually write the new expiration to the db if it moves the expiration some minimum diff --git a/workers/worker.py b/workers/worker.py index 506a16f97..9f2851343 100644 --- a/workers/worker.py +++ b/workers/worker.py @@ -11,6 +11,7 @@ from threading import Thread from time import sleep from data.model import db +from data.queue import WorkQueue logger = logging.getLogger(__name__) @@ -97,7 +98,7 @@ class Worker(object): def extend_processing(self, seconds_from_now): with self._current_item_lock: if self.current_queue_item is not None: - self._queue.extend_processing(self.current_queue_item, seconds_from_now) + WorkQueue.extend_processing(self.current_queue_item, seconds_from_now) def run_watchdog(self): logger.debug('Running watchdog.')