Try to decode the message event if it's not a Platypush message
This commit is contained in:
parent
3872276234
commit
57baa0c64a
1 changed files with 8 additions and 2 deletions
|
@ -48,8 +48,14 @@ class RedisBackend(Backend):
|
|||
try:
|
||||
msg = Message.build(json.loads(msg))
|
||||
except:
|
||||
try:
|
||||
import ast
|
||||
msg = Message.build(ast.literal_eval(msg))
|
||||
except:
|
||||
try:
|
||||
msg = json.loads(msg)
|
||||
except Exception as e:
|
||||
self.logger.exception(e)
|
||||
|
||||
return msg
|
||||
|
||||
|
|
Loading…
Reference in a new issue