bluesky_queueserver_api.console_monitor.ConsoleMonitor_ZMQ_Threads

class bluesky_queueserver_api.console_monitor.ConsoleMonitor_ZMQ_Threads(*, zmq_info_addr, poll_timeout, max_msgs, max_lines)[source]

Console Monitor API (0MQ). The class implements a monitor for console output published by RE Manager over 0MQ. The asynchronous version of the class must be instantiated in the loop.

Parameters:
zmq_info_addr: str

Address of 0MQ PUB socket. The SUB socket of the monitor subscribes to this address once the class is instantiated.

poll_timeout: float

Timeout used for polling 0MQ socket. The value does not influence performance. It may take longer to stop the background thread or task, if the value is too large.

max_msgs: int

Maximum number of messages in the buffer. New messages are ignored if the buffer is full. This could happen only if console monitoring is enabled, but messages are not read from the buffer. Setting the value to 0 disables collection of messages in the buffer.

max_lines: int

Maximum number of lines in the text buffer. Setting the value to 0 disables processing of text messages and generation of text output.

__init__(*, zmq_info_addr, poll_timeout, max_msgs, max_lines)[source]

Methods

__init__(*, zmq_info_addr, poll_timeout, ...)

clear()

Clear the message buffer.

disable()

Disable monitoring of the console output.

disable_wait(*[, timeout])

Disable monitoring and wait for completion.

enable()

Enable monitoring of the console output.

next_msg([timeout])

Returns the next message from the buffer.

text([nlines])

Returns text representation of console output.

Attributes

enabled

Indicates if monitoring is enabled.

text_max_lines

Get/set the maximum size of the text buffer.

text_uid

Returns UID of the current text buffer.