Example #1
0
 def publish(self, channel, body=None):
     payload = json_dumps({
         'channel': channel,
         'body': body,
     })
     self.db.publish('pigeon:publish', payload)
Example #2
0
 def to_json(self):
     return json_dumps({
         'channel': self.channel.name,
         'body': self.body,
     })
Example #3
0
 def to_json(self):
     return json_dumps({
         'type': self.type,
         'channel': self.channel,
     })