foxhole/app/workers.py

14 lines
298 B
Python
Raw Permalink Normal View History

#!/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()