File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Meta/Keywords/scripting_library/configuration Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2222
2323import octobot_tentacles_manager .api
2424
25+ _EXPECTED_MAX_TENTACLES_COUNT = 256
26+
2527
2628def get_config_history_propagated_tentacles_config_keys (tentacle : str ) -> list [str ]:
2729 tentacle_class = octobot_tentacles_manager .api .get_tentacle_class_from_string (tentacle )
2830 return tentacle_class .get_config_history_propagated_tentacles_config_keys ()
2931
3032
3133# cached to avoid calling default_parents_inspection when unnecessary
32- @functools .lru_cache (maxsize = 128 )
34+ @functools .lru_cache (maxsize = _EXPECTED_MAX_TENTACLES_COUNT )
3335def is_trading_mode_tentacle (tentacle_name : str ) -> bool :
3436 tentacle_class = octobot_tentacles_manager .api .get_tentacle_class_from_string (tentacle_name )
3537 return tentacles_management .default_parents_inspection (tentacle_class , octobot_trading .modes .AbstractTradingMode )
3638
3739
3840# cached to avoid calling default_parents_inspection when unnecessary
39- @functools .lru_cache (maxsize = 128 )
41+ @functools .lru_cache (maxsize = _EXPECTED_MAX_TENTACLES_COUNT )
4042def is_exchange_tentacle (tentacle_name : str ) -> bool :
4143 tentacle_class = octobot_tentacles_manager .api .get_tentacle_class_from_string (tentacle_name )
4244 return tentacles_management .default_parents_inspection (tentacle_class , exchanges .RestExchange )
You can’t perform that action at this time.
0 commit comments