mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
webserver mode should properly validate config
This commit is contained in:
parent
7bc317fea7
commit
3bc49330ce
|
@ -7,9 +7,10 @@ def start_webserver(args: Dict[str, Any]) -> None:
|
||||||
"""
|
"""
|
||||||
Main entry point for webserver mode
|
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
|
from freqtrade.rpc.api_server import ApiServer
|
||||||
|
|
||||||
# Initialize configuration
|
# Initialize configuration
|
||||||
config = Configuration(args, RunMode.WEBSERVER).get_config()
|
|
||||||
|
config = setup_utils_configuration(args, RunMode.WEBSERVER)
|
||||||
ApiServer(config, standalone=True)
|
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
|
conf_schema['required'] = constants.SCHEMA_BACKTEST_REQUIRED
|
||||||
else:
|
else:
|
||||||
conf_schema['required'] = constants.SCHEMA_BACKTEST_REQUIRED_FINAL
|
conf_schema['required'] = constants.SCHEMA_BACKTEST_REQUIRED_FINAL
|
||||||
|
elif conf.get('runmode', RunMode.OTHER) == RunMode.WEBSERVER:
|
||||||
|
conf_schema['required'] = constants.SCHEMA_MINIMAL_WEBSERVER
|
||||||
else:
|
else:
|
||||||
conf_schema['required'] = constants.SCHEMA_MINIMAL_REQUIRED
|
conf_schema['required'] = constants.SCHEMA_MINIMAL_REQUIRED
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -667,6 +667,9 @@ SCHEMA_MINIMAL_REQUIRED = [
|
||||||
'dataformat_ohlcv',
|
'dataformat_ohlcv',
|
||||||
'dataformat_trades',
|
'dataformat_trades',
|
||||||
]
|
]
|
||||||
|
SCHEMA_MINIMAL_WEBSERVER = SCHEMA_MINIMAL_REQUIRED + [
|
||||||
|
'api_server',
|
||||||
|
]
|
||||||
|
|
||||||
CANCEL_REASON = {
|
CANCEL_REASON = {
|
||||||
"TIMEOUT": "cancelled due to timeout",
|
"TIMEOUT": "cancelled due to timeout",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user