From 057db322c79169d9a155285fcfa35e3b4955f1c9 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Aug 04 2020 04:17:15 +0000 Subject: Use mdapi-messages schema This uses the new mdapi-messages schema to send the Repo Update message to Fedora Messaging Signed-off-by: Ryan Lerch --- diff --git a/mdapi-get_repo_md b/mdapi-get_repo_md index 1471bd3..9b32bb3 100755 --- a/mdapi-get_repo_md +++ b/mdapi-get_repo_md @@ -47,6 +47,7 @@ import sqlite3 import requests +from mdapi_messages.messages import RepoUpdateV1 from fedora_messaging.api import Message, publish from fedora_messaging.exceptions import PublishReturned, ConnectionException @@ -313,8 +314,7 @@ def publish_changes(name, packages, repomd_url): print(f"{name.ljust(padding)} url {url}") try: - msg = Message( - topic="mdapi.repo.update", + msg = RepoUpdateV1( body=dict( name=name, packages=list(packages), diff --git a/requirements.txt b/requirements.txt index ab77745..f09c981 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ aiohttp >= 3.5.4 aiosqlite fedora_messaging +mdapi_messages # this is a requirement of aiohttp but better safe than sorry requests uvloop