decode protonmsg props field when loading from db
This commit is contained in:
parent
fdccd38148
commit
b4b83c8251
1 changed files with 5 additions and 0 deletions
|
|
@ -350,6 +350,11 @@ def handle_db_msgs(urls, CONFIG):
|
||||||
aliases=('id', 'address', 'props', 'body'),
|
aliases=('id', 'address', 'props', 'body'),
|
||||||
opts={'order': 'id', 'limit': limit})
|
opts={'order': 'id', 'limit': limit})
|
||||||
msgs = list(query.execute())
|
msgs = list(query.execute())
|
||||||
|
for msg in msgs:
|
||||||
|
try:
|
||||||
|
msg['props'] = json.loads(msg['props'])
|
||||||
|
except Exception:
|
||||||
|
LOG.error('Unable to load message from db: %r', msg)
|
||||||
if not msgs:
|
if not msgs:
|
||||||
return
|
return
|
||||||
if CONFIG.getboolean('broker', 'test_mode', fallback=False):
|
if CONFIG.getboolean('broker', 'test_mode', fallback=False):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue