mxcubecore.queue_entry.base_queue_entry#
All queue entries inherits the baseclass BaseQueueEntry which in turn inherits QueueEntryContainer. This makes it possible to arrange and execute queue entries in a hierarchical manner.
Functions
|
|
|
Classes
|
Base class for queue entry objects. |
|
|
|
|
A QueueEntryContainer has a list of queue entries, classes inheriting BaseQueueEntry, and a Queue object. |
|
|
|
|
Defines the behaviour of sample queue entries. |
|
Exceptions
|
|
|
|
|
- class mxcubecore.queue_entry.base_queue_entry.BaseQueueEntry(view=None, data_model=None, view_set_queue_entry=True)[source]#
Bases:
QueueEntryContainer
Base class for queue entry objects. Defines the overall interface and behaviour for a queue entry.
- enqueue(queue_entry)[source]#
Method inherited from QueueEntryContainer, a derived class should newer need to override this method.
- execute()[source]#
Execute method, should be overriden my subclasses, defines the main body of the procedure to be performed when the entry is executed.
The default executer calls excute on all child entries after this method but before post_execute.
- post_execute()[source]#
Procedure to be done after execute, and execute of all children of this entry.
- set_data_model(data_model)[source]#
Sets the model node of this queue entry to <data_model>
- Parameters:
data_model (TaskNode) – The data model node.
- set_enabled(state)[source]#
Enables or disables this entry, controls if this item should be executed (enabled) or not (disabled)
- Parameters:
state (bool) – Enabled if state is True otherwise disabled.
- set_view(view, view_set_queue_entry=True)[source]#
Sets the view of this queue entry to <view>. Makes the corresponding bidirectional connection if view_set_queue_entry is set to True. Which is normally case, it can be useful with ‘uni-directional’ connection in some rare cases.
- Parameters:
view (ViewItem) – The view to associate with this entry
view_set_queue_entry (bool) – Bi- or uni-directional connection to view.
- class mxcubecore.queue_entry.base_queue_entry.BasketQueueEntry(view=None, data_model=None)[source]#
Bases:
BaseQueueEntry
- class mxcubecore.queue_entry.base_queue_entry.DelayQueueEntry(view=None, data_model=None)[source]#
Bases:
BaseQueueEntry
- exception mxcubecore.queue_entry.base_queue_entry.QueueAbortedException(message, origin)[source]#
Bases:
QueueExecutionException
- class mxcubecore.queue_entry.base_queue_entry.QueueEntryContainer[source]#
Bases:
object
A QueueEntryContainer has a list of queue entries, classes inheriting BaseQueueEntry, and a Queue object. The Queue object controls/handles the execution of the queue entries.
- dequeue(queue_entry)[source]#
Dequeues the QueueEntry <queue_entry> and returns the dequeued entry.
Throws ValueError if the queue_entry is not in the queue.
- Parameters:
queue_entry (QueueEntry) – The queue entry to dequeue/remove.
- Returns:
The dequeued entry.
- Return type:
QueueEntry
- set_container(queue_entry_container)[source]#
Sets the parent queue entry to <queue_entry_container>
- Parameters:
queue_entry_container (QueueEntryContainer) –
- class mxcubecore.queue_entry.base_queue_entry.QueueEntryStatusType(SUCCESS, WARNING, FAILED, SKIPPED, RUNNING, NOT_EXECUTED)#
Bases:
tuple
- FAILED#
Alias for field number 2
- NOT_EXECUTED#
Alias for field number 5
- RUNNING#
Alias for field number 4
- SKIPPED#
Alias for field number 3
- SUCCESS#
Alias for field number 0
- WARNING#
Alias for field number 1
- exception mxcubecore.queue_entry.base_queue_entry.QueueExecutionException(message, origin)[source]#
Bases:
Exception
- exception mxcubecore.queue_entry.base_queue_entry.QueueSkipEntryException(message, origin)[source]#
Bases:
QueueExecutionException
- class mxcubecore.queue_entry.base_queue_entry.SampleQueueEntry(view=None, data_model=None)[source]#
Bases:
BaseQueueEntry
Defines the behaviour of sample queue entries. Mounting, launching centring and so on.
- execute()[source]#
Execute method, should be overriden my subclasses, defines the main body of the procedure to be performed when the entry is executed.
The default executer calls excute on all child entries after this method but before post_execute.
- class mxcubecore.queue_entry.base_queue_entry.TaskGroupQueueEntry(view=None, data_model=None)[source]#
Bases:
BaseQueueEntry
- execute()[source]#
Execute method, should be overriden my subclasses, defines the main body of the procedure to be performed when the entry is executed.
The default executer calls excute on all child entries after this method but before post_execute.