Class Ruote::WaitLogger
In: lib/ruote/log/wait_logger.rb
lib/ruote/log/fancy_printing.rb
Parent: Object

Methods

check_waiting   color   color=   dump   fancy_log   fancy_print   fei_to_s   fp   matches   new   on_msg   radial_tree   wait_for  

Constants

FINAL_ACTIONS = %w[ terminated ceased error_intercepted ]
ACTIONS = FINAL_ACTIONS + %w[ launch apply reply fail dispatch dispatched receive cancel dispatch_cancel kill pause resume dispatch_pause dispatch_resume regenerate pause_process resume_process cancel_process kill_process reput noop raise respark ]

Attributes

log  [R] 
noisy  [RW]  When set to true, this logger will spit out the ruote activity happening in this Ruby‘s runtime ruote worker (if any) to $stdout.
seen  [R] 
timeout  [RW]  The timeout for wait_for. Defaults to 60 (seconds). When set to number inferior or equal to zero, no timeout will be enforced.

Public Class methods

Public Instance methods

Debug only : dumps all the seen events to $stdout

Returns an array of the latest msgs, but fancy-printed. The oldest first.

The context will call this method for each msg sucessfully processed by the worker.

Blocks until one or more interests are satisfied.

interests must be an array of interests. Please refer to Dashboard#wait_for documentation for allowed values of each interest.

If multiple interests are given, wait_for blocks until all of the interests are satisfied.

wait_for may only be used by one thread at a time. If one thread calls wait_for and later another thread calls wait_for while the first thread is waiting, the first thread‘s interests are lost and the first thread will never wake up.

Protected Instance methods

Checks whether message msg matches any of interests being waited for.

Some interests look for actions on particular workflows (e.g., waiting for some workflow to finish). Other interests are not attached to any particular workflow (e.g., :inactive waits until the engine finishes processing all active and pending workflows) but are still satisfied when actions happen on workflows (e.g., the last workflow being run finishes).

Returns true if all interests being waited for have been satisfied, false otherwise.

[Validate]