Skip to content

Commit e8ad034

Browse files
committed
Moving Dask interceptor instance to scheduler_plugin.start dask/distributed#9001
1 parent 492cca9 commit e8ad034

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/flowcept/flowceptor/adapters/dask/dask_plugins.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from uuid import uuid4
44

55
from dask.distributed import WorkerPlugin, SchedulerPlugin
6-
from distributed import Client
6+
from distributed import Client, Scheduler
77

88
from flowcept import WorkflowObject
99
from flowcept.configs import INSTRUMENTATION
@@ -69,8 +69,11 @@ def register_dask_workflow(
6969
class FlowceptDaskSchedulerAdapter(SchedulerPlugin):
7070
"""Dask schedule adapter."""
7171

72-
def __init__(self, scheduler):
73-
self.address = scheduler.address
72+
def __init__(self):
73+
self.interceptor = None
74+
75+
def start(self, scheduler: Scheduler) -> None:
76+
"""Run this when scheduler starts"""
7477
self.interceptor = DaskSchedulerInterceptor(scheduler)
7578

7679
def transition(self, key, start, finish, *args, **kwargs):

0 commit comments

Comments
 (0)