mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-08 23:30:29 +00:00
webserver mode should properly validate config
This commit is contained in:
@@ -7,9 +7,10 @@ def start_webserver(args: Dict[str, Any]) -> None:
|
||||
"""
|
||||
Main entry point for webserver mode
|
||||
"""
|
||||
from freqtrade.configuration import Configuration
|
||||
from freqtrade.configuration import setup_utils_configuration
|
||||
from freqtrade.rpc.api_server import ApiServer
|
||||
|
||||
# Initialize configuration
|
||||
config = Configuration(args, RunMode.WEBSERVER).get_config()
|
||||
|
||||
config = setup_utils_configuration(args, RunMode.WEBSERVER)
|
||||
ApiServer(config, standalone=True)
|
||||
|
||||
@@ -51,6 +51,8 @@ def validate_config_schema(conf: Dict[str, Any], preliminary: bool = False) -> D
|
||||
conf_schema['required'] = constants.SCHEMA_BACKTEST_REQUIRED
|
||||
else:
|
||||
conf_schema['required'] = constants.SCHEMA_BACKTEST_REQUIRED_FINAL
|
||||
elif conf.get('runmode', RunMode.OTHER) == RunMode.WEBSERVER:
|
||||
conf_schema['required'] = constants.SCHEMA_MINIMAL_WEBSERVER
|
||||
else:
|
||||
conf_schema['required'] = constants.SCHEMA_MINIMAL_REQUIRED
|
||||
try:
|
||||
|
||||
@@ -667,6 +667,9 @@ SCHEMA_MINIMAL_REQUIRED = [
|
||||
'dataformat_ohlcv',
|
||||
'dataformat_trades',
|
||||
]
|
||||
SCHEMA_MINIMAL_WEBSERVER = SCHEMA_MINIMAL_REQUIRED + [
|
||||
'api_server',
|
||||
]
|
||||
|
||||
CANCEL_REASON = {
|
||||
"TIMEOUT": "cancelled due to timeout",
|
||||
|
||||
Reference in New Issue
Block a user