Move the metric put outside the transaction
This commit is contained in:
parent
2ff77df946
commit
4da66c1219
1 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Reference in a new issue