protonmsg: cast body to text

This commit is contained in:
Yu Ming Zhu 2021-07-10 07:29:29 +00:00 committed by Tomas Kopecek
parent 012a2eb83b
commit 243e114b1f

View file

@ -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: