diff --git a/scdata/_config/config.py b/scdata/_config/config.py index 9566752..2769130 100644 --- a/scdata/_config/config.py +++ b/scdata/_config/config.py @@ -48,8 +48,10 @@ class Config(object): ### --------------------------------------- ### -----------------DATA------------------ ### --------------------------------------- - # Data Margin in minutes for consecutive requests - _cache_data_margin = '10Min' + data = { + 'cached_data_margin': '10Min', # Data Margin in minutes for consecutive requests + 'reload_metadata': True # Reload metadata + } # Maximum amount of points to load when postprocessing data _max_load_amount = 500 diff --git a/scdata/device/device.py b/scdata/device/device.py index d6829aa..3fdce4f 100644 --- a/scdata/device/device.py +++ b/scdata/device/device.py @@ -303,7 +303,7 @@ async def load(self, cache=None, convert_units=True, convert_names=True, max_amo # Make request with a logical min_date if not cached_data.empty: # Update min_date - min_date=cached_data.index[-1].tz_convert('UTC')+Timedelta(frequency)+Timedelta(config._cache_data_margin) + min_date=cached_data.index[-1].tz_convert('UTC')+Timedelta(frequency)+Timedelta(config.data['cached_data_margin']) # Not implemented "for now" elif self.source.type == 'stream':