Temporary fix to reload all strategies
This commit is contained in:
parent
24f8fb4ece
commit
97bbc2381d
@ -3,6 +3,7 @@ Main Freqtrade worker class.
|
|||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
from os import getpid
|
from os import getpid
|
||||||
from typing import Any, Callable, Dict, Optional
|
from typing import Any, Callable, Dict, Optional
|
||||||
@ -176,6 +177,14 @@ class Worker:
|
|||||||
# Load and validate config and create new instance of the bot
|
# Load and validate config and create new instance of the bot
|
||||||
self._init(True)
|
self._init(True)
|
||||||
|
|
||||||
|
# Todo Temporary fix to reload all strategies
|
||||||
|
from pathlib import Path
|
||||||
|
from freqtrade.resolvers.strategy_resolver import StrategyResolver
|
||||||
|
from freqtrade.constants import FTHYPT_FILEVERSION, USERPATH_STRATEGIES
|
||||||
|
|
||||||
|
directory = Path(self._config.get('strategy_path', self._config['user_data_dir'] / USERPATH_STRATEGIES))
|
||||||
|
strategy_objs = StrategyResolver.search_all_objects(directory, False)
|
||||||
|
|
||||||
self.freqtrade.notify_status('config reloaded')
|
self.freqtrade.notify_status('config reloaded')
|
||||||
|
|
||||||
# Tell systemd that we completed reconfiguration
|
# Tell systemd that we completed reconfiguration
|
||||||
|
Loading…
Reference in New Issue
Block a user