Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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)