Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage Tracking: Fix logging to only log messages when tracking is enabled #3748

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading