Skip to content

Commit

Permalink
[Hardening] Remove code warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSolutions committed Sep 17, 2019
1 parent c005c21 commit e03a438
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geonode/monitoring/management/commands/collect_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ def run_check(self, service, collector, since=None, until=None, force_check=None
until = local_tz.localize(until).astimezone(utc).replace(tzinfo=utc)

last_check = local_tz.localize(since).astimezone(utc).replace(tzinfo=utc) if since else service.last_check
_monitoring_ttl_max = 365 if force_check else settings.MONITORING_DATA_TTL
if not last_check or last_check > until or (until - last_check) > timedelta(days=_monitoring_ttl_max):
_monitoring_ttl_max = timedelta(days=365) if force_check else settings.MONITORING_DATA_TTL
if not last_check or last_check > until or (until - last_check) > _monitoring_ttl_max:
last_check = (until - _monitoring_ttl_max)
service.last_check = last_check

Expand Down

0 comments on commit e03a438

Please sign in to comment.