diff --git a/data/queue.py b/data/queue.py index 9b03123d0..c5e5dad72 100644 --- a/data/queue.py +++ b/data/queue.py @@ -128,9 +128,9 @@ class WorkQueue(object): with self._transaction_factory(db): r = str(QueueItem.create(**params).id) - if self._metric_queue: - self._metric_queue.put('Added', 1, dimensions={'queue': self._queue_name}) - return r + if self._metric_queue: + self._metric_queue.put('Added', 1, dimensions={'queue': self._queue_name}) + return r def get(self, processing_time=300): """