Package ganeti :: Module jqueue :: Class _JobProcessor
[hide private]
[frames] | no frames]

Class _JobProcessor

source code


Instance Methods [hide private]
 
__init__(self, queue, opexec_fn, job, _timeout_strategy_factory=mcpu.LockAttemptTimeoutStrategy)
Initializes this class.
source code
 
_ExecOpCodeUnlocked(self, opctx)
Processes one opcode and returns the result.
source code
 
__call__(self, _nextop_fn=None)
Continues execution of a job.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
_FindNextOpcode(job, timeout_strategy_factory)
Locates the next opcode to run.
source code
 
_MarkWaitlock(job, op)
Marks an opcode as waiting for locks.
source code
bool
_CheckDependencies(queue, job, opctx)
Checks if an opcode has dependencies and if so, processes them.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, queue, opexec_fn, job, _timeout_strategy_factory=mcpu.LockAttemptTimeoutStrategy)
(Constructor)

source code 

Initializes this class.

Overrides: object.__init__

_FindNextOpcode(job, timeout_strategy_factory)
Static Method

source code 

Locates the next opcode to run.

Parameters:
  • job (_QueuedJob) - Job object
  • timeout_strategy_factory - Callable to create new timeout strategy

_MarkWaitlock(job, op)
Static Method

source code 

Marks an opcode as waiting for locks.

The job's start timestamp is also set if necessary.

Parameters:

_CheckDependencies(queue, job, opctx)
Static Method

source code 

Checks if an opcode has dependencies and if so, processes them.

Parameters:
Returns: bool
Whether opcode will be re-scheduled by dependency tracker

__call__(self, _nextop_fn=None)
(Call operator)

source code 

Continues execution of a job.

Parameters:
  • _nextop_fn - Callback function for tests
Returns:
FINISHED if job is fully processed, DEFER if the job should be deferred and WAITDEP if the dependency manager (_JobDependencyManager) will re-schedule the job when appropriate