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

Gather four block/job status structures together #3528

Merged
merged 3 commits into from
Jul 18, 2024
Merged
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
18 changes: 13 additions & 5 deletions parsl/executors/status_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,28 @@ def __init__(self, *,
else:
self.block_error_handler = block_error_handler

# errors can happen during the submit call to the provider; this is used
# to keep track of such errors so that they can be handled in one place
# together with errors reported by status()
self._simulated_status: Dict[str, JobStatus] = {}
self._executor_bad_state = threading.Event()
self._executor_exception: Optional[Exception] = None

self._block_id_counter = AtomicIDCounter()

self._tasks = {} # type: Dict[object, Future]

self._last_poll_time = 0.0

# these four structures track, in loosely coordinated fashion, the
# existence of blocks and jobs and how to map between their
# identifiers.
self.blocks_to_job_id = {} # type: Dict[str, str]
self.job_ids_to_block = {} # type: Dict[str, str]

self._last_poll_time = 0.0
# errors can happen during the submit call to the provider; this is used
# to keep track of such errors so that they can be handled in one place
# together with errors reported by status()
self._simulated_status: Dict[str, JobStatus] = {}

# this stores an approximation (sometimes delayed) of the latest status
# of pending, active and recently terminated blocks
self._status = {} # type: Dict[str, JobStatus]

def _make_status_dict(self, block_ids: List[str], status_list: List[JobStatus]) -> Dict[str, JobStatus]:
Expand Down
Loading