Merge "Ensure event time listener is in listeners docs"

This commit is contained in:
Jenkins
2015-03-12 22:37:13 +00:00
committed by Gerrit Code Review
2 changed files with 15 additions and 3 deletions

View File

@@ -170,6 +170,8 @@ Timing listeners
.. autoclass:: taskflow.listeners.timing.PrintingDurationListener .. autoclass:: taskflow.listeners.timing.PrintingDurationListener
.. autoclass:: taskflow.listeners.timing.EventTimeListener
Claim listener Claim listener
-------------- --------------
@@ -191,6 +193,7 @@ Hierarchy
taskflow.listeners.logging.DynamicLoggingListener taskflow.listeners.logging.DynamicLoggingListener
taskflow.listeners.logging.LoggingListener taskflow.listeners.logging.LoggingListener
taskflow.listeners.printing.PrintingListener taskflow.listeners.printing.PrintingListener
taskflow.listeners.timing.PrintingTimingListener taskflow.listeners.timing.PrintingDurationListener
taskflow.listeners.timing.TimingListener taskflow.listeners.timing.EventTimeListener
taskflow.listeners.timing.DurationListener
:parts: 1 :parts: 1

View File

@@ -121,7 +121,16 @@ PrintingTimingListener = moves.moved_class(
class EventTimeListener(base.Listener): class EventTimeListener(base.Listener):
"""Writes task, flow, and retry event timestamps to atom metadata.""" """Listener that captures task, flow, and retry event timestamps.
It records how when an event is received (using unix time) to
storage. It saves the timestamps under keys (in atom or flow details
metadata) of the format ``{event}-timestamp`` where ``event`` is the
state/event name that has been received.
This information can be later extracted/examined to derive durations...
"""
def __init__(self, engine, def __init__(self, engine,
task_listen_for=base.DEFAULT_LISTEN_FOR, task_listen_for=base.DEFAULT_LISTEN_FOR,
flow_listen_for=base.DEFAULT_LISTEN_FOR, flow_listen_for=base.DEFAULT_LISTEN_FOR,