14 lines
298 B
Python
14 lines
298 B
Python
|
#!/usr/bin/env python3
|
||
|
import asyncio
|
||
|
import signal
|
||
|
from typing import Generic
|
||
|
from typing import TypeVar
|
||
|
|
||
|
from loguru import logger
|
||
|
|
||
|
T = TypeVar("T")
|
||
|
class Worker(Generic[T]):
|
||
|
def __init__(self) -> None:
|
||
|
self._loop = asyncio.get_event_loop()
|
||
|
self._stop_event = asyncio.Event()
|