appstream: parallelize branch info requests

parent 41f6a541
import asyncio
from telegrinder.modules import logger
from altrepo import altrepo
BRANCHES = ["sisyphus", "p11"]
async def update_appstream_data():
for branch in ["sisyphus", "p11"]:
results = await asyncio.gather(*(
altrepo.api.package.package_info(
"appstream-data-desktop", branch=branch, source=True
)
for branch in BRANCHES
))
package = (
await altrepo.api.package.package_info(
"appstream-data-desktop", branch=branch, source=True
)
).packages[0]
for branch, result in zip(BRANCHES, results):
package = result.packages[0]
current_version = altrepo.appstream.data.get_current_version(branch)
package_version = f"{package.version}-{package.release}"
if (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment