Skip to content

Commit f40b358

Browse files
committed
removed usage of distributed.Variable as it can time out
1 parent 53f823f commit f40b358

File tree

1 file changed

+0
-10
lines changed
  • services/director-v2/src/simcore_service_director_v2/modules

1 file changed

+0
-10
lines changed

services/director-v2/src/simcore_service_director_v2/modules/dask_client.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
99
"""
1010

11-
import asyncio
1211
import logging
1312
from collections.abc import Callable, Iterable
1413
from dataclasses import dataclass
@@ -241,9 +240,6 @@ def _comp_sidecar_fct(
241240
)
242241
# NOTE: the callback is running in a secondary thread, and takes a future as arg
243242
task_future.add_done_callback(lambda _: callback())
244-
await distributed.Variable(job_id, client=self.backend.client).set(
245-
task_future
246-
)
247243

248244
await dask_utils.wrap_client_async_routine(
249245
self.backend.client.publish_dataset(task_future, name=job_id)
@@ -560,12 +556,6 @@ async def get_task_result(self, job_id: str) -> TaskOutputData:
560556
async def release_task_result(self, job_id: str) -> None:
561557
_logger.debug("releasing results for %s", f"{job_id=}")
562558
try:
563-
# NOTE: The distributed Variable holds the future of the tasks in the dask-scheduler
564-
# Alas, deleting the variable is done asynchronously and there is no way to ensure
565-
# the variable was effectively deleted.
566-
# This is annoying as one can re-create the variable without error.
567-
var = distributed.Variable(job_id, client=self.backend.client)
568-
await asyncio.get_event_loop().run_in_executor(None, var.delete)
569559
# first check if the key exists
570560
await dask_utils.wrap_client_async_routine(
571561
self.backend.client.get_dataset(name=job_id)

0 commit comments

Comments
 (0)