You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A more detailed example, using both a non-default transport and a queued client::
32
+
33
+
from riemann_client.transport import TCPTransport
34
+
from riemann_client.client import QueuedClient
35
+
36
+
with QueuedClient(TCPTransport('localhost', 5555)) as client:
37
+
client.event(service='one', metric_f=1)
38
+
client.event(service='two', metric_f=2)
39
+
client.flush()
40
+
41
+
The ``QueuedClient`` class modifies the ``event()`` method to add events to a queue instead of immediately sending them, and adds the ``flush()`` method to send the current event queue as a single message.
0 commit comments