···
# Prepare updater workers for each temp_dir directory.
# At most `num_workers` instances of `run_update_script` will be running at one time.
-
updaters = asyncio.gather(
-
for temp_dir in temp_dirs
except asyncio.exceptions.CancelledError:
# When one worker is cancelled, cancel the others too.
except UpdateFailedException as e:
# When one worker fails, cancel the others, as this exception is only thrown when keep_going is false.
···
eprint("Running update for:")
-
asyncio.run(start_updates(max_workers, keep_going, commit, packages))
eprint("Packages updated!")
···
args = parser.parse_args()
except KeyboardInterrupt as e:
# Let’s cancel outside of the main loop too.
···
# Prepare updater workers for each temp_dir directory.
# At most `num_workers` instances of `run_update_script` will be running at one time.
+
for temp_dir in temp_dirs
+
tasks = asyncio.gather(
except asyncio.exceptions.CancelledError:
# When one worker is cancelled, cancel the others too.
except UpdateFailedException as e:
# When one worker fails, cancel the others, as this exception is only thrown when keep_going is false.
···
eprint("Running update for:")
+
await start_updates(max_workers, keep_going, commit, packages)
eprint("Packages updated!")
···
args = parser.parse_args()
except KeyboardInterrupt as e:
# Let’s cancel outside of the main loop too.