Skip to content

Commit

Permalink
fix MariaDB crawler
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterain98 committed Nov 11, 2024
1 parent 49c01eb commit db3aec2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions utils/mariadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ def make_cache() -> tuple[list[dict[str, str]], list[dict[str, str]]]:
return_list = []
latest_meta = []
live_version_branches = [b["release_id"] for b in httpx.get(VERSIONS_API).json()["major_releases"]
if b["release_status"] == "Stable"]
if b["release_status"] == "Stable" and b["release_support_type"] == "Long Term Support"]
version_branches = list(set(oneinstack_compatible_versions + live_version_branches))
version_branches.sort(reverse=True)
logger.info(f"Available MariaDB versions: {version_branches}")
for version in version_branches:
logger.info(f"Fetching MariaDB version {version}")
this_branch_latest_meta = {
"version_file_name": f"mariadb{version.replace(".", "")}_ver",
"version": None
}
this_version_packages = []
patch_list = list(httpx.get(VERSION_RESOURCE_API.format(version=version)).json()["releases"].values())
rsp = httpx.get(VERSION_RESOURCE_API.format(version=version)).json()
patch_list = list(rsp["releases"].values())
for patch in patch_list:
try:
linux_package = [f for f in patch["files"] if f["os"] == "Linux" and f["cpu"].lower() == "x86_64"
Expand All @@ -46,3 +48,7 @@ def make_cache() -> tuple[list[dict[str, str]], list[dict[str, str]]]:
for meta in latest_meta:
logger.info(f"Latest MariaDB version for {meta['version_file_name']} is {meta['version']}")
return return_list, latest_meta


if __name__ == "__main__":
make_cache()

0 comments on commit db3aec2

Please sign in to comment.