Skip to content

Commit

Permalink
Address Pedro's review
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelweingartner committed May 29, 2024
1 parent d26099b commit 87b29a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gnocchi/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ def clean_raw_data_inactive_metrics(self):
LOG.debug("Executing the raw data cleanup for metric [%s].",
metric)
try:
metrid_id = metric.id
metricd_id = metric.id
# To properly generate the lock here, we need to use the
# same process as it is done in the measures processing.
# Therefore, we have to use the sack to control the locks
# in this processing here. See 'process_new_measures_for_sack'
# for more details.
sack_for_metric = self.incoming.sack_for_metric(metrid_id)
sack_for_metric = self.incoming.sack_for_metric(metricd_id)
metric_lock = self.get_sack_lock(sack_for_metric)

if not metric_lock.acquire():
Expand Down Expand Up @@ -197,8 +197,8 @@ def clean_raw_data_inactive_metrics(self):

metric_lock.release()
except Exception:
LOG.error("Unable to lock metric [%s] for cleanup.",
metric, exc_info=True)
LOG.warning("Unable to lock metric [%s] for cleanup.",
metric, exc_info=True)
continue

if metrics_to_clean:
Expand Down

0 comments on commit 87b29a9

Please sign in to comment.