Package ganeti :: Module jstore
[hide private]
[frames] | no frames]

Module jstore

source code

Module implementing the job queue handling.

Functions [hide private]
None or int
_ReadNumericFile(file_name)
Reads a file containing a number.
source code
 
ReadSerial()
Read the serial file.
source code
 
ReadVersion()
Read the queue version.
source code
utils.FileLock
InitAndVerifyQueue(must_lock)
Open and lock job queue.
source code

Imports: errno, constants, errors, utils


Function Details [hide private]

_ReadNumericFile(file_name)

source code 

Reads a file containing a number.

Returns: None or int
None if file is not found, otherwise number

ReadSerial()

source code 

Read the serial file.

The queue should be locked while this function is called.

ReadVersion()

source code 

Read the queue version.

The queue should be locked while this function is called.

InitAndVerifyQueue(must_lock)

source code 

Open and lock job queue.

If necessary, the queue is automatically initialized.

Parameters:
  • must_lock (bool) - Whether an exclusive lock must be held.
Returns: utils.FileLock
Lock object for the queue. This can be used to change the locking mode.