Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
abelanger5 committed May 31, 2024
1 parent 4be6518 commit 94426f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hatchet_sdk/clients/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def unregister(self):
CANCEL_STEP_RUN = 1
START_GET_GROUP_KEY = 2


class Event_ts(asyncio.Event):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
Expand All @@ -119,6 +120,7 @@ def set(self):
def clear(self):
self._loop.call_soon_threadsafe(super().clear)


async def read_action(listener: Any, interrupt: Event_ts):
assigned_action = await listener.read()
interrupt.set()
Expand All @@ -131,6 +133,7 @@ async def exp_backoff_sleep(attempt: int, max_sleep_time: float = 5):
sleep_time = min(base_time * (2**attempt) + jitter, max_sleep_time)
await asyncio.sleep(sleep_time)


class ActionListenerImpl(WorkerActionListener):
config: ClientConfig

Expand Down

0 comments on commit 94426f5

Please sign in to comment.