Skip to content

Commit d77ca63

Browse files
committed
check_mirrors.py now check all known mirrors
1 parent 94e01ea commit d77ca63

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
from tqdm.asyncio import tqdm
1515

1616

17+
mirrors = [
18+
"https://dfint.github.io",
19+
"https://gitverse.ru/api/repos/dfint/data-mirror/raw/branch/master",
20+
]
21+
22+
1723
def get_semaphore_wrapper(
1824
semaphore: asyncio.Semaphore | None = None,
1925
) -> Callable[[Awaitable], Coroutine]:
@@ -49,12 +55,7 @@ async def probe_url(client: httpx.AsyncClient, url: str) -> None:
4955
# print(".", end="", flush=True)
5056

5157

52-
async def main():
53-
if len(sys.argv) < 2:
54-
mirror = "https://dfint.github.io"
55-
else:
56-
mirror = "https://" + sys.argv[1]
57-
58+
async def check_mirror(mirror: str) -> None:
5859
print("Checking mirror", mirror)
5960
print("Loading manifests...")
6061

@@ -110,6 +111,12 @@ async def main():
110111
await task
111112

112113
print("Done.")
114+
print("=" * 120)
115+
116+
117+
async def main() -> None:
118+
for mirror in mirrors:
119+
await check_mirror(mirror)
113120

114121

115122
if __name__ == "__main__":

0 commit comments

Comments
 (0)