Skip to content

Commit

Permalink
Revert "avoid creating Lock/Event without a running loop"
Browse files Browse the repository at this point in the history
This reverts commit 3c26731.
  • Loading branch information
graingert committed Jul 28, 2022
1 parent 3c26731 commit f92d549
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions dask_jobqueue/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from contextlib import contextmanager, suppress
import asyncio
import logging
import math
import os
Expand All @@ -12,7 +11,6 @@
import tempfile
import copy
import warnings
import functools

import dask

Expand Down Expand Up @@ -96,22 +94,7 @@
""".strip()


class FixedProcessInterface(ProcessInterface):
def __init__(self, scheduler=None, name=None):
self.address = getattr(self, "address", None)
self.external_address = None
self.status = Status.created

@functools.cached_property
def lock(self):
return asyncio.Lock()

@functools.cached_property
def _event_finished(self):
return asyncio.Event()


class Job(FixedProcessInterface, abc.ABC):
class Job(ProcessInterface, abc.ABC):
""" Base class to launch Dask workers on Job queues
This class should not be used directly, use a class appropriate for
Expand Down

0 comments on commit f92d549

Please sign in to comment.