add producers attribute to dataprovider

This commit is contained in:
Timothy Pogue 2022-09-07 17:14:26 -06:00
parent 5934495dda
commit a50923f796

View File

@ -54,10 +54,8 @@ class DataProvider:
self.__msg_cache = PeriodicCache(
maxsize=1000, ttl=timeframe_to_seconds(self._default_timeframe))
self._num_sources = len(
self._config.get('external_message_consumer', {}).get('producers', [])
)
self.external_data_enabled = self._num_sources > 0
self.producers = self._config.get('external_message_consumer', {}).get('producers', [])
self.external_data_enabled = len(self.producers) > 0
def _set_dataframe_max_index(self, limit_index: int):
"""