Merge branch 'develop' into pr/wizrds/7303

This commit is contained in:
Matthias
2022-09-20 06:56:15 +02:00
103 changed files with 1189 additions and 442 deletions

View File

@@ -12,6 +12,7 @@ from fastapi.middleware.cors import CORSMiddleware
from janus import Queue as ThreadedQueue
from starlette.responses import JSONResponse
from freqtrade.constants import Config
from freqtrade.exceptions import OperationalException
from freqtrade.rpc.api_server.uvicorn_threaded import UvicornServer
from freqtrade.rpc.api_server.ws import ChannelManager
@@ -42,10 +43,10 @@ class ApiServer(RPCHandler):
_bt = None
_bt_data = None
_bt_timerange = None
_bt_last_config: Dict[str, Any] = {}
_bt_last_config: Config = {}
_has_rpc: bool = False
_bgtask_running: bool = False
_config: Dict[str, Any] = {}
_config: Config = {}
# Exchange - only available in webserver mode.
_exchange = None
# websocket message queue stuff
@@ -63,7 +64,7 @@ class ApiServer(RPCHandler):
ApiServer.__initialized = False
return ApiServer.__instance
def __init__(self, config: Dict[str, Any], standalone: bool = False) -> None:
def __init__(self, config: Config, standalone: bool = False) -> None:
ApiServer._config = config
if self.__initialized and (standalone or self._standalone):
return