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

Added logic to clean up executor interchange log #513

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
8 changes: 7 additions & 1 deletion funcx_endpoint/funcx_endpoint/strategies/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ def strategize(self, *args, **kwargs):

def _strategize(self, *args, **kwargs):
task_breakdown = self.interchange.get_outstanding_breakdown()
logger.info(f"Task breakdown {task_breakdown}")
num_tasks = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to sum here. We can log if there is any non-zero entry, which is a bit faster.

for breakdown_item in task_breakdown:
num_tasks += breakdown_item[1]
if num_tasks > 0:
logger.info(f"Task breakdown {task_breakdown}")
else:
logger.debug(f"Task breakdown {task_breakdown}")

min_blocks = self.interchange.provider.min_blocks
max_blocks = self.interchange.provider.max_blocks
Expand Down