This commit is contained in:
1 parent
646ba3be81
commit
aae5b73581
14 files changed
+883
-142
No files matched your search
+5
-3
@@ -43,7 +43,8 @@ def _run(config, store):
|
||||
stop = threading.Event()
|
||||
previous = {}
|
||||
uploader = Uploader(config.upload, store) if config.upload.url else None
|
||||
recovery = HistoryRecovery(config.history, config.collector.source_id, store) if config.history.enabled else None
|
||||
recovery = HistoryRecovery(config.history, config.collector.source_id, store,
|
||||
timezone_name=config.collector.timezone) if config.history.enabled else None
|
||||
worker = None
|
||||
history_worker = None
|
||||
status_server = None
|
||||
@@ -137,8 +138,9 @@ def main(argv=None):
|
||||
print(json.dumps({"deleted": store.prune()}))
|
||||
elif args.command == "recover":
|
||||
if not config.history.enabled:
|
||||
raise ValueError("Enable history and configure Solar.web API credentials before recovery")
|
||||
recovery = HistoryRecovery(config.history, config.collector.source_id, store)
|
||||
raise ValueError("Enable history and configure Solar.web account credentials before recovery")
|
||||
recovery = HistoryRecovery(config.history, config.collector.source_id, store,
|
||||
timezone_name=config.collector.timezone)
|
||||
print(json.dumps({"recovered": recovery.recover(start, until)}))
|
||||
elif args.command == "export":
|
||||
for sample in store.records(start, until):
|
||||
|
||||
Reference in new issue
Block a user