def __init__(self, scheduler):
    self.scheduler = scheduler
    self.stealable_all = [set() for i in range(15)]
    self.stealable = dict()
    self.key_stealable = dict()
    self.cost_multipliers = [(1 + (2 ** (i - 6))) for i in range(15)]
    self.cost_multipliers[0] = 1
    for worker in scheduler.workers:
        self.add_worker(worker=worker)
    self._callback_time = parse_timedelta(dask.config.get('distributed.scheduler.work-stealing-interval'), default='ms')
    self.scheduler.add_plugin(self)
    self.scheduler.extensions['stealing'] = self
    self.scheduler.events['stealing'] = deque(maxlen=100000)
    self.count = 0
    self.in_flight = dict()
    self.in_flight_occupancy = defaultdict((lambda : 0))
    self._in_flight_event = asyncio.Event()
    self.scheduler.stream_handlers['steal-response'] = self.move_task_confirm
def __init__(self, scheduler):
    self.scheduler = scheduler
    self.stealable_all = [set() for i in range(15)]
    self.stealable = dict()
    self.key_stealable = dict()
    self.cost_multipliers = [(1 + (2 ** (i - 6))) for i in range(15)]
    self.cost_multipliers[0] = 1
    for worker in scheduler.workers:
        self.add_worker(worker=worker)
    self._callback_time = parse_timedelta(dask.config.get('distributed.scheduler.work-stealing-interval'), default='ms')
    self.scheduler.add_plugin(self)
    self.scheduler.extensions['stealing'] = self
    self.scheduler.events['stealing'] = deque(maxlen=100000)
    self.count = 0
    self.in_flight = dict()
    self.in_flight_occupancy = defaultdict((lambda : 0))
    self._in_flight_event = asyncio.Event()
    self.scheduler.stream_handlers['steal-response'] = self.move_task_confirm