From c7f2a77e7116a7a8302e5635068ef577028ccea0 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Aug 06 2021 07:48:54 +0000 Subject: PR#2955: protonmsg: cast body to text Merges #2955 https://pagure.io/koji/pull-request/2955 Fixes: #2954 https://pagure.io/koji/issue/2954 protonmsg: message body is not decoded back to String from DB --- diff --git a/plugins/hub/protonmsg.py b/plugins/hub/protonmsg.py index bbf4df5..1198c25 100644 --- a/plugins/hub/protonmsg.py +++ b/plugins/hub/protonmsg.py @@ -347,7 +347,8 @@ def handle_db_msgs(urls, CONFIG): c.execute("DELETE FROM proton_queue WHERE created_ts < NOW() -'%s hours'::interval" % CONFIG.getint('queue', 'age', fallback=24)) query = QueryProcessor(tables=('proton_queue',), - columns=('id', 'address', 'props', 'body'), + columns=('id', 'address', 'props', 'body::TEXT'), + aliases=('id', 'address', 'props', 'body'), opts={'order': 'id', 'limit': limit}) msgs = list(query.execute()) if not msgs: