Skip to content

Commit

Permalink
Merge pull request GueroudjiAmal#7 from GueroudjiAmal/bridge
Browse files Browse the repository at this point in the history
stimulus external task
  • Loading branch information
GueroudjiAmal authored Dec 21, 2023
2 parents 47031f0 + 1b85485 commit 9b7ce18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion distributed/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
from distributed import preloading
from distributed.core import ConnectionPool
from distributed.security import Security
from distributed.utils import LoopRunner, SyncMethodMixin, no_default, sync
from distributed.utils import LoopRunner, SyncMethodMixin, sync
from distributed.utils_comm import gather_from_workers, scatter_to_workers

from dask.typing import no_default

logger = logging.getLogger(__name__)

def _handle_print(event):
Expand Down
5 changes: 4 additions & 1 deletion distributed/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5078,7 +5078,10 @@ def stimulus_external_task_finished(
ws: WorkerState = self.workers[worker]
ts: TaskState = self.tasks.get(key)
if ts.state == "external":
ts.metadata.update(kwargs["metadata"])
if kwargs["metadata"]:
if ts.metadata is None:
ts.metadata = dict()
ts.metadata.update(kwargs["metadata"])
r: tuple = self._transition(
key, "memory", stimulus_id, worker=worker, **kwargs
)
Expand Down

0 comments on commit 9b7ce18

Please sign in to comment.