mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-12-25 16:32:47 +00:00
anaconda: change anaconda installers scanning
Some checks failed
docker-images / multi (., tunasync-scripts) (push) Has been cancelled
docker-images / multi (bandersnatch) (push) Has been cancelled
docker-images / multi (dockerfiles/rubygems, rubygems-mirror) (push) Has been cancelled
docker-images / multi (ftpsync) (push) Has been cancelled
docker-images / multi (nix-channels) (push) Has been cancelled
docker-images / multi (pub-mirror) (push) Has been cancelled
docker-images / multi (rustup-mirror) (push) Has been cancelled
docker-images / multi (shadowmire) (push) Has been cancelled
docker-images / multi (tsumugu) (push) Has been cancelled
Some checks failed
docker-images / multi (., tunasync-scripts) (push) Has been cancelled
docker-images / multi (bandersnatch) (push) Has been cancelled
docker-images / multi (dockerfiles/rubygems, rubygems-mirror) (push) Has been cancelled
docker-images / multi (ftpsync) (push) Has been cancelled
docker-images / multi (nix-channels) (push) Has been cancelled
docker-images / multi (pub-mirror) (push) Has been cancelled
docker-images / multi (rustup-mirror) (push) Has been cancelled
docker-images / multi (shadowmire) (push) Has been cancelled
docker-images / multi (tsumugu) (push) Has been cancelled
This commit is contained in:
parent
e311a59a63
commit
4764ee0d68
|
|
@ -273,6 +273,7 @@ def sync_installer(repo_url, local_dir: Path):
|
||||||
logging.info("Start syncing {}".format(repo_url))
|
logging.info("Start syncing {}".format(repo_url))
|
||||||
local_dir.mkdir(parents=True, exist_ok=True)
|
local_dir.mkdir(parents=True, exist_ok=True)
|
||||||
full_scan = random.random() < 0.1 # Do full version check less frequently
|
full_scan = random.random() < 0.1 # Do full version check less frequently
|
||||||
|
scan_futher = True
|
||||||
|
|
||||||
def remote_list():
|
def remote_list():
|
||||||
r = requests.get(repo_url, timeout=TIMEOUT_OPTION)
|
r = requests.get(repo_url, timeout=TIMEOUT_OPTION)
|
||||||
|
|
@ -293,6 +294,9 @@ def sync_installer(repo_url, local_dir: Path):
|
||||||
dst_file_wip = local_dir / (".downloading." + filename)
|
dst_file_wip = local_dir / (".downloading." + filename)
|
||||||
|
|
||||||
if dst_file.is_file():
|
if dst_file.is_file():
|
||||||
|
if not scan_futher:
|
||||||
|
logging.info("Skipping {} without checking".format(filename))
|
||||||
|
continue
|
||||||
r = requests.head(pkg_url, allow_redirects=True, timeout=TIMEOUT_OPTION)
|
r = requests.head(pkg_url, allow_redirects=True, timeout=TIMEOUT_OPTION)
|
||||||
len_avail = "content-length" in r.headers
|
len_avail = "content-length" in r.headers
|
||||||
if len_avail:
|
if len_avail:
|
||||||
|
|
@ -313,7 +317,7 @@ def sync_installer(repo_url, local_dir: Path):
|
||||||
# Stop the scanning if the most recent version is present
|
# Stop the scanning if the most recent version is present
|
||||||
if not full_scan:
|
if not full_scan:
|
||||||
logging.info("Stop the scanning")
|
logging.info("Stop the scanning")
|
||||||
break
|
scan_futher = False
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue