diff --git a/alab_management/resource_manager/resource_requester.py b/alab_management/resource_manager/resource_requester.py index ced4c4ad..3c5de40b 100644 --- a/alab_management/resource_manager/resource_requester.py +++ b/alab_management/resource_manager/resource_requester.py @@ -244,7 +244,7 @@ def request_resources( except concurrent.futures.TimeoutError as e: # if the request is not fulfilled, cancel it to make sure the resources are released request = self._request_collection.find_one_and_update({ - "_id": result.inserted_id, + "_id": _id, "status": {"$ne": RequestStatus.FULFILLED.name} }, { "$set": {