Reduce the update period on queue worker metrics.

This commit is contained in:
Jake Moshenko 2016-12-05 18:10:04 -05:00
parent 7c490b46c8
commit 709edd7eb6
2 changed files with 3 additions and 1 deletions

View file

@ -105,6 +105,7 @@ class DefaultConfig(object):
# Build Queue Metrics
QUEUE_METRICS_TYPE = 'Null'
QUEUE_WORKER_METRICS_REFRESH_SECONDS = 300
# Exception logging
EXCEPTION_LOG_TYPE = 'FakeSentry'

View file

@ -40,7 +40,8 @@ class QueueWorker(Worker):
# Add the various operations.
self.add_operation(self.poll_queue, self._poll_period_seconds)
self.add_operation(self.update_queue_metrics, 60)
self.add_operation(self.update_queue_metrics,
app.config['QUEUE_WORKER_METRICS_REFRESH_SECONDS'])
self.add_operation(self.run_watchdog, self._watchdog_period_seconds)
def process_queue_item(self, job_details):