module documentation
Module implementing the job queue handling.
| Function | |
Check if the queue is marked to be drained. |
| Function | |
Convert a job ID to int format. |
| Function | |
Returns the archive directory for a job. |
| Function | |
Open and lock job queue. |
| Function | |
Parses a job ID and converts it to integer. |
| Function | |
Read the serial file. |
| Function | |
Read the queue version. |
| Function | |
Sets the drain flag for the queue. |
| Function | _ |
Reads a file containing a number. |
Check if the queue is marked to be drained.
This currently uses the queue drain file, which makes it a per-node flag. In the future this can be moved to the config file.
| Returns | |
| boolean | True if the job queue is marked drained |
Convert a job ID to int format.
Currently this just is a no-op that performs some checks, but if we want to change the job id format this will abstract this change.
| Parameters | |
| job | the numeric job id |
| Returns | |
| int | the formatted job id |
Open and lock job queue.
If necessary, the queue is automatically initialized.
| Parameters | |
| must | Whether an exclusive lock must be held. |
| Returns | |
| utils.FileLock | Lock object for the queue. This can be used to change the locking mode. |
Sets the drain flag for the queue.
| Parameters | |
| drain | Whether to set or unset the drain flag |
| Unknown Field: attention | |
| This function should only called the current holder of the queue lock | |