[Sync] sync refactoring: renamed main -> run_sync
This commit is contained in:
1 parent
39a15b0fa6
commit
52a80d6496
1 file changed
+8
-8
+8
-8
@@ -38,7 +38,7 @@ def init_logger(name: str, file: str):
|
|||||||
logger.addHandler(ch)
|
logger.addHandler(ch)
|
||||||
|
|
||||||
|
|
||||||
async def main(sync: Sync):
|
async def run_sync(sync: Sync):
|
||||||
await sync.run()
|
await sync.run()
|
||||||
|
|
||||||
|
|
||||||
@@ -82,13 +82,13 @@ async def run(run_interval=0):
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
await asyncio.wait([
|
await asyncio.wait([
|
||||||
main(sync_documents),
|
run_sync(sync_documents),
|
||||||
main(sync_pages),
|
run_sync(sync_pages),
|
||||||
main(sync_persons),
|
run_sync(sync_persons),
|
||||||
main(sync_articles),
|
run_sync(sync_articles),
|
||||||
main(sync_schedules),
|
run_sync(sync_schedules),
|
||||||
main(sync_albums),
|
run_sync(sync_albums),
|
||||||
main(sync_settings),
|
run_sync(sync_settings),
|
||||||
])
|
])
|
||||||
|
|
||||||
if run_interval == 0:
|
if run_interval == 0:
|
||||||
|
|||||||
Reference in new issue
Block a user