Exemplo n.º 1
0
 def from_event_encode(cls, topic, payload=None):
     if payload is None:
         payload = ffi.NULL
     elif not isinstance(payload, basestring):
         # Convert dict or list into json string
         payload = json.dumps(payload)
     handle = raw.flux_event_encode(topic, payload)
     return cls(handle=handle)
Exemplo n.º 2
0
 def from_event_encode(cls, topic, payload=None):
     if payload is None:
         payload = ffi.NULL
     elif not isinstance(payload, basestring):
         # Convert dict or list into json string
         payload = json.dumps(payload)
     handle = raw.flux_event_encode(topic, payload)
     return cls(handle=handle)
Exemplo n.º 3
0
 def from_event_encode(cls, topic, payload=None):
     payload = encode_payload(payload)
     handle = raw.flux_event_encode(topic, payload)
     return cls(handle=handle)
Exemplo n.º 4
0
 def from_event_encode(cls, topic, payload=None):
     payload = encode_payload(payload)
     handle = raw.flux_event_encode(topic, payload)
     return cls(handle=handle)