Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
PalNilsson committed Feb 9, 2024
1 parent bf2c3f2 commit 864a158
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pilot/control/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def get_proper_pilot_heartbeat() -> int:
return int(config.Pilot.pilot_heartbeat)
except Exception as exc:
logger.warning(f'detected outdated config file: please update default.cfg: {exc}')
return 10 * 60
return 60


def run_checks(queues: Any, args: Any) -> None:
Expand All @@ -325,6 +325,7 @@ def run_checks(queues: Any, args: Any) -> None:
if is_pilot_check(check='pilot_heartbeat'):
last_heartbeat = time.time() - args.pilot_heartbeat
_pilot_heartbeat = get_proper_pilot_heartbeat()

if last_heartbeat > _pilot_heartbeat:
detected_job_suspension = True if last_heartbeat > 10 * 60 else False
if detected_job_suspension:
Expand Down
2 changes: 1 addition & 1 deletion pilot/util/heartbeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def time_since_suspension() -> int:
if time_since_detection:
# reset the time since detection to zero
update_pilot_heartbeat(time.time(), False, 0)

logger.info('reset time since detection to zero')
return time_since_detection

return 0
Expand Down

0 comments on commit 864a158

Please sign in to comment.