cleanup: Remove unnecessary signal handler in bybit_md_provider.py
We handle them properly in sparkd now
This commit is contained in:
1 parent
b46e75f7d7
commit
59f62b6ec9
1 file changed
-12
@@ -4,7 +4,6 @@ import time
|
||||
import logging
|
||||
import sys
|
||||
import threading
|
||||
import signal
|
||||
from itertools import chain
|
||||
from typing import Iterable, Optional
|
||||
from pybit.unified_trading import WebSocket
|
||||
@@ -83,17 +82,6 @@ class BybitMdProvider(MdProvider):
|
||||
self.ws_thread: Optional[threading.Thread] = None
|
||||
self.bridge: Optional[MdBridge] = None
|
||||
self.stop_event = threading.Event()
|
||||
self._setup_signal_handlers()
|
||||
|
||||
def _setup_signal_handlers(self):
|
||||
"""Set up signal handlers for SIGINT, SIGTERM, and SIGTSTP."""
|
||||
def signal_handler(sig, frame):
|
||||
logger.info(f"Received signal {sig}, stopping...")
|
||||
self.stop()
|
||||
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
signal.signal(signal.SIGTSTP, signal_handler)
|
||||
|
||||
@property
|
||||
def config(self):
|
||||
|
||||
Reference in new issue
Block a user