soprano.hpc.submitter.debug.debugqueue#
Definition of a fake QueueInterface class, useful for debugging Submitters.
Classes
|
DebugQueueInterface object |
- class soprano.hpc.submitter.debug.debugqueue.DebugQueueInterface(dt=0.1)[source]#
Bases:
QueueInterface
DebugQueueInterface object
A class meant to emulate a QueueInterface while doing absolutely nothing of what it does. Jobs are simply stored locally, there’s a fixed waiting time, and are then executed. Ideally they should be simple, quick stuff (like an echo command). No guarantees for actually long jobs.
In the submitted script a syntax for additional variables is allowed, similar to real queue systems. These follow the convention of many engines of having to start with #$. For example
#$ WAIT 10
means the job will be put in a “wait” state for 10 seconds. The currently available variables are:
WAIT - specify how long the job has to stay in a “wait” state. If two values are provided, these are considered bounds for a random number RUN - same as above, but for the running state. This has no bearing on the actual running time (it’s suggested that it’s something very quick)
Initialize the DebugQueueInterface.
Args:dt (float): frequency with which the queue status is updated- list()[source]#
List all jobs found in the queue
Returns:jobs (dict): a dict of jobs classified by ID containing all infothat can be matched through list_outre
- property remote_target#
RemoteTarget if a remote Host is set
- set_remote_host(host=None, timeout=1.0)#
Set a remote host for use by this QueueInterface
If a remote host is set, this Interface will try using the Paramiko library to connect to it via SSH. Check the docstring of soprano.hpc.submitter.utils.RemoteTarget to see what the limitations are for this usage.
Args:host (Optional[str]): host name of the remote machine to connectto. Further information must be contained inthe user’s ~/.ssh/config file. If left emptythe remote host is UNSET and therefore theinterface goes back to local use.timeout (Optional[float]): connection timeout in seconds (defaultis 1 second)