Skip to content

Commit 2bc5097

Browse files
committed
simplified code
1 parent 87ac64d commit 2bc5097

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

livesync/sync.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ async def run_folder_tasks(folders: Iterable[Folder], mutex_interval: float, ign
3030
asyncio.create_task(folder.watch())
3131

3232
while True:
33-
if ignore_mutex:
34-
await asyncio.sleep(0)
35-
continue
36-
summary = get_summary(folders)
37-
for mutex in mutexes.values():
38-
if not mutex.set(summary):
39-
break
33+
if not ignore_mutex:
34+
summary = get_summary(folders)
35+
for mutex in mutexes.values():
36+
if not mutex.set(summary):
37+
break
4038
await asyncio.sleep(mutex_interval)
4139
except Exception as e:
4240
print(e)

0 commit comments

Comments
 (0)