diff --git a/pilot/util/heartbeat.py b/pilot/util/heartbeat.py index 09105243..31f1135b 100644 --- a/pilot/util/heartbeat.py +++ b/pilot/util/heartbeat.py @@ -74,10 +74,10 @@ def update_pilot_heartbeat(update_time: float, detected_job_suspension: bool = F dictionary['max_diff_time'] = max_diff_time dictionary[f'last_{name}_update'] = int(update_time) dictionary['time_since_detection'] = time_since_detection if detected_job_suspension else 0 - if time_since_detection: + if detected_job_suspension: logger.warning(f'job suspension detected: time since detection: {time_since_detection} seconds') else: - logger.debug(f'no job suspension detected (detected_job_suspension={detected_job_suspension})') + logger.debug('no job suspension detected') status = write_json(path, dictionary) if not status: