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):
|
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):
|
||||||
"""
|
"""
|
||||||
|
|
Reference in a new issue