Merge pull request #519 from mjibson/no-put-in-trans

Move the metric put outside the transaction
This commit is contained in:
Matt Jibson 2015-09-21 13:39:04 -04:00
commit 41ac84a026

View file

@ -128,9 +128,9 @@ class WorkQueue(object):
with self._transaction_factory(db): with self._transaction_factory(db):
r = str(QueueItem.create(**params).id) r = str(QueueItem.create(**params).id)
if self._metric_queue: if self._metric_queue:
self._metric_queue.put('Added', 1, dimensions={'queue': self._queue_name}) self._metric_queue.put('Added', 1, dimensions={'queue': self._queue_name})
return r return r
def get(self, processing_time=300): def get(self, processing_time=300):
""" """