Skip to content

Commit

Permalink
fix dfk logging to not print usage tracking messages when usage track…
Browse files Browse the repository at this point in the history
…ing is disabled
  • Loading branch information
NishchayKarle committed Jan 15, 2025
1 parent 83a2030 commit 0a34651
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions parsl/dataflow/dflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from parsl.monitoring.message_type import MessageType
from parsl.monitoring.remote import monitor_wrapper
from parsl.process_loggers import wrap_with_logs
from parsl.usage_tracking.levels import DISABLED as USAGE_TRACKING_DISABLED
from parsl.usage_tracking.usage import UsageTracker
from parsl.utils import Timer, get_all_checkpoints, get_std_fname_mode, get_version

Expand Down Expand Up @@ -1200,10 +1201,11 @@ def cleanup(self) -> None:
self._checkpoint_timer.close()

# Send final stats
logger.info("Sending end message for usage tracking")
self.usage_tracker.send_end_message()
self.usage_tracker.close()
logger.info("Closed usage tracking")
if self.usage_tracker.tracking_level != USAGE_TRACKING_DISABLED:
logger.info("Sending end message for usage tracking")
self.usage_tracker.send_end_message()
self.usage_tracker.close()
logger.info("Closed usage tracking")

logger.info("Closing job status poller")
self.job_status_poller.close()
Expand Down

0 comments on commit 0a34651

Please sign in to comment.