diff --git a/data/queue.py b/data/queue.py index 205e30287..041f644f5 100644 --- a/data/queue.py +++ b/data/queue.py @@ -116,8 +116,8 @@ class WorkQueue(object): dimensions=dim) self._metric_queue.put_deprecated('Available', available_count, dimensions=dim) - self._metric_queue.work_queue_running.set(running_count, labelvalues=[self._queue_name]) - self._metric_queue.work_queue_available.set(available_count, labelvalues=[self._queue_name]) + self._metric_queue.work_queue_running.Set(running_count, labelvalues=[self._queue_name]) + self._metric_queue.work_queue_available.Set(available_count, labelvalues=[self._queue_name]) if self._reporter: self._reporter(self._currently_processing, running_count, diff --git a/workers/globalpromstats.py b/workers/globalpromstats.py index 4b5c24242..8fe433808 100644 --- a/workers/globalpromstats.py +++ b/workers/globalpromstats.py @@ -26,18 +26,19 @@ class GlobalPrometheusStatsWorker(Worker): with GlobalLock('GLOBAL_PROM_STATS'): self._report_stats() except LockNotAcquiredException: + logger.debug('Could not acquire global lock for global prometheus stats') return def _report_stats(self): logger.debug('Reporting global stats') with UseThenDisconnect(app.config): # Repository count. - metric_queue.repository_count.set(model.repository.get_repository_count()) + metric_queue.repository_count.Set(model.repository.get_repository_count()) # User counts. - metric_queue.user_count.set(model.user.get_active_user_count()) - metric_queue.org_count.set(model.organization.get_active_org_count()) - metric_queue.robot_count.set(model.user.get_robot_count()) + metric_queue.user_count.Set(model.user.get_active_user_count()) + metric_queue.org_count.Set(model.organization.get_active_org_count()) + metric_queue.robot_count.Set(model.user.get_robot_count()) def main():