Better import - added missed file

Fix - changed metaclass of AbstractProvider
Fix - added missed implementation of abstract method
This commit is contained in:
petr.kalis 2020-07-21 16:58:32 +02:00
parent 574dc150a3
commit 4a232eded3
3 changed files with 51 additions and 2 deletions

View file

@ -214,7 +214,8 @@ class SynchServerThread(threading.Thread):
while self.is_running:
sync_representations = self.module.get_sync_representations()
import time
start_time = time.time()
for provider in lib.factory.providers: # TODO clumsy
for sync in sync_representations:
files = sync.get("files") or {}
@ -227,7 +228,8 @@ class SynchServerThread(threading.Thread):
await self.module.upload(file, sync, provider)
if status == SyncStatus.DO_DOWNLOAD:
await self.module.download(file, sync, provider)
duration = time.time() - start_time
log.info("One loop took {}".format(duration))
await asyncio.sleep(60)
def stop(self):