mxcubecore.HardwareObjects.QueueManager#

QueueManager, handles the execution of the MxCuBE queue. It is implemented as a hardware object and is configured by an XML file. See the example of the XML configuration for more details.

The Queue manager acts as both the controller of execution and as the root/ container of the queue, note the inheritance from QueueEntryContainer. See the documentation for the queue_entry module for more information.

Classes

QueueManager(name)

class mxcubecore.HardwareObjects.QueueManager.QueueManager(name)[source]#

Bases: HardwareObject, QueueEntryContainer

clear()[source]#

Clears the queue (removes all entries).

Returns:

None

Return type:

NoneType

disable(state)[source]#

Sets the disable state to <state>, disables the possibility to call execute if True enables if False.

Parameters:

state (bool) – The disabled state, True, False.

Returns:

None

Return type:

NoneType

enqueue(queue_entry)[source]#

Method inherited from QueueEntryContainer, enqueues the QueueEntry object <queue_entry>.

Parameters:

queue_entry (QueueEntry) – QueueEntry to add

Returns:

None

Return type:

NoneType

execute(entry=None)[source]#

Starts execution of the queue.

Runs the entire queue or a single entry (entry is set) as one “run” of the queue and manages the various states such as “running”, “paused” and “stopped”.

Parameters:

entry (QueueEntry) – Optional, queue_entry to run

Raises:

RuntimeError, if the queue is already running when called

execute_entry(entry, use_async=False)[source]#

Executes the queue entry once the queue has been started <entry>.

Parameters:

entry (QueueEntry) – The entry to execute.

Raises:

RuntimeError if the queue is not already running when called

Returns:

None

Return type:

NoneType

get_current_entry()[source]#

Gets the currently executing QueueEntry.

Returns:

The currently executing QueueEntry:

Return type:

QueueEntry

get_entry_with_model(model, root_queue_entry=None)[source]#

Find the entry with the data model model.

Parameters:

model (TaskNode) – The model to look for.

Returns:

The QueueEntry with the model <model>

Return type:

QueueEntry

init()[source]#

Hardware object init.

is_disabled()[source]#
Returns:

True if the queue is disabled, (calling execute will do nothing).

Return type:

bool

is_executing(node_id=None)[source]#
Returns:

True if the queue is executing otherwise False

Return type:

bool

is_paused()[source]#

Returns the pause state, see the method set_pause().

Returns:

None

Return type:

NoneType

pause(state)[source]#

Sets the queue in paused state <state> (and waits), paused if True running if False.

Parameters:

state (bool) – Paused if True running if False

Returns:

None

Return type:

NoneType

set_current_entry(entry)[source]#

Sets the currently executing QueueEntry to <entry>.

Parameters:

entry (QeueuEntry) – The entry.

Returns:

None

Return type:

NoneType

set_pause(state)[source]#

Sets the queue in paused state <state>. Emits the signal queue_paused with the current state as parameter.

Parameters:

state (bool) – Paused if True running if False

Returns:

None

Return type:

NoneType

stop()[source]#

Stops the queue execution.

Returns:

None

Return type:

NoneType

wait_for_pause_event()[source]#

Wait for the queue to be set to running set_pause(False) or continue if it already was running.

Returns:

None

Return type:

NoneType