mxcubecore.HardwareObjects.Native#

Functions

queue_add_child(server_hwobj, parent_id, child)

Adds the model node task to parent_id.

queue_add_node(server_hwobj, task_node[, set_on])

Adds the TaskNode objects contained in the json seralized list of TaskNodes passed in <task_node>.

queue_get_available_serialisations(self)

Returns a tuple of the available serialisation methods for native queue objects

queue_get_full_path(server_hwobj, suddir, tag)

queue_get_model_code(server_hwobj)

returns a list of tuples of (name of queue model module, source code of queue model).

queue_get_node(server_hwobj, node_id)

returns the TaskNode object with the node id <node_id> :rtype:

TaskNode

queue_get_serialisation(self)

queue_set_serialisation(self, backend)

queue_update_result(server_hwobj, node_id, ...)

mxcubecore.HardwareObjects.Native.queue_add_child(server_hwobj, parent_id, child)[source]#

Adds the model node task to parent_id.

Parameters:
  • parent_id (int) – The id of the parent.

  • child (TaskNode) – The TaskNode object to add.

Returns:

The id of the added TaskNode object.

Return type:

int

mxcubecore.HardwareObjects.Native.queue_add_node(server_hwobj, task_node, set_on=True)[source]#

Adds the TaskNode objects contained in the json seralized list of TaskNodes passed in <task_node>.

The TaskNodes are marked as activated in the queue if <set_on> is True and to inactivated if False.

Parameters:
  • task_node – TaskNode object to add to queue

  • set_on (bool) – Mark TaskNode as activated if True and as inactivated if false.

Returns:

True on success otherwise False

Return type:

bool

mxcubecore.HardwareObjects.Native.queue_get_available_serialisations(self)[source]#

Returns a tuple of the available serialisation methods for native queue objects

mxcubecore.HardwareObjects.Native.queue_get_model_code(server_hwobj)[source]#

returns a list of tuples of (name of queue model module, source code of queue model).

The client can compile and use the queue model as follows:

for (module_name, module_code) in server.native_get_queue_model_code():

queue_model_objects = imp.new_module(module_name) exec module_code in queue_model_objects.__dict__ sys.modules[module_name] = queue_model_objects

The module containing the required queue model objects is the last one in the list, so after the loop exits queue_model_objects is set to the module that is needed by the client.

Modules other than the last one are modules imported by the queue model that are not available for direct import by the XML-RPC client

mxcubecore.HardwareObjects.Native.queue_get_node(server_hwobj, node_id)[source]#

:returns the TaskNode object with the node id <node_id> :rtype: TaskNode