Annotate zephyr_mirror.py.
This commit is contained in:
parent
f50548d644
commit
80a4826f49
|
@ -34,9 +34,13 @@ from .zephyr_mirror_backend import parse_args
|
|||
(options, args) = parse_args()
|
||||
|
||||
sys.path[:0] = [os.path.join(options.root_path, 'api')]
|
||||
|
||||
from types import FrameType
|
||||
from typing import Any
|
||||
|
||||
def die(signal, frame):
|
||||
# type: (int, FrameType) -> None
|
||||
|
||||
# We actually want to exit, so run os._exit (so as not to be caught and restarted)
|
||||
os._exit(1)
|
||||
|
||||
|
@ -59,6 +63,7 @@ if options.forward_class_messages and not options.noshard:
|
|||
print("Starting parallel zephyr class mirroring bot")
|
||||
jobs = list("0123456789abcdef")
|
||||
def run_job(shard):
|
||||
# type: (str) -> int
|
||||
subprocess.call(args + ["--shard=%s" % (shard,)])
|
||||
return 0
|
||||
for (status, job) in run_parallel(run_job, jobs, threads=16):
|
||||
|
|
Loading…
Reference in a new issue