Skip to content

Commit

Permalink
Merge pull request #67 from ecmwf-projects/fix-futures-pop-issue
Browse files Browse the repository at this point in the history
Fix futures pop issue
  • Loading branch information
francesconazzaro authored Jul 19, 2023
2 parents 2cdba7a + ee90560 commit b981e11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cads_broker/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ def on_future_done(self, future: distributed.Future) -> None:
job_id=request.request_uid,
)
return
logger.info(f"{type(future.key)} - {future.key}")
self.futures.pop(future.key)
self.qos.notify_end_of_request(request, session)
logger.info(
Expand Down Expand Up @@ -249,12 +248,12 @@ def submit_request(
resources=request.request_metadata.get("resources", {}),
metadata=request.request_metadata,
)
self.futures[request.request_uid] = future
future.add_done_callback(self.on_future_done)
request = db.set_request_status(
request_uid=request.request_uid, status="running", session=session
)
self.qos.notify_start_of_request(request, session)
self.futures[request.request_uid] = future
logger.info(
"submitted job to scheduler",
**db.logger_kwargs(request=request),
Expand Down

0 comments on commit b981e11

Please sign in to comment.