Increase cache for rate limit to avoid delays
Helps when calling /status or /status table frequently on slowish exchanges
This commit is contained in:
parent
0f50449196
commit
b38f9ed5e7
@ -54,8 +54,11 @@ class FreqtradeBot:
|
|||||||
# Init objects
|
# Init objects
|
||||||
self.config = config
|
self.config = config
|
||||||
|
|
||||||
self._sell_rate_cache = TTLCache(maxsize=100, ttl=5)
|
_process_throttle_secs = self.config['internals'].get('process_throttle_secs',
|
||||||
self._buy_rate_cache = TTLCache(maxsize=100, ttl=5)
|
constants.PROCESS_THROTTLE_SECS)
|
||||||
|
# Use 3x process_throttle_secs for caching to avoid delays in RPC methods.
|
||||||
|
self._sell_rate_cache = TTLCache(maxsize=100, ttl=_process_throttle_secs * 3)
|
||||||
|
self._buy_rate_cache = TTLCache(maxsize=100, ttl=_process_throttle_secs * 3)
|
||||||
|
|
||||||
self.strategy: IStrategy = StrategyResolver.load_strategy(self.config)
|
self.strategy: IStrategy = StrategyResolver.load_strategy(self.config)
|
||||||
|
|
||||||
|
@ -304,7 +304,8 @@ def default_conf(testdatadir):
|
|||||||
"user_data_dir": Path("user_data"),
|
"user_data_dir": Path("user_data"),
|
||||||
"verbosity": 3,
|
"verbosity": 3,
|
||||||
"strategy_path": str(Path(__file__).parent / "strategy" / "strats"),
|
"strategy_path": str(Path(__file__).parent / "strategy" / "strats"),
|
||||||
"strategy": "DefaultStrategy"
|
"strategy": "DefaultStrategy",
|
||||||
|
"internals": {},
|
||||||
}
|
}
|
||||||
return configuration
|
return configuration
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user