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

Class _WaitForJobChangesHelper

source code


Helper class using inotify to wait for changes in a job file.

This class takes a previous job status and serial, and alerts the client when the current job status has changed.

Instance Methods [hide private]
 
__call__(self, filename, job_load_fn, fields, prev_job_info, prev_log_serial, timeout)
Waits for changes on a job.
source code

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

Static Methods [hide private]
 
_CheckForChanges(counter, job_load_fn, check_fn) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, filename, job_load_fn, fields, prev_job_info, prev_log_serial, timeout)
(Call operator)

source code 

Waits for changes on a job.

Parameters:
  • filename (string) - File on which to wait for changes
  • job_load_fn (callable) - Function to load job
  • fields (list of strings) - Which fields to check for changes
  • prev_job_info (list or None) - Last job information returned
  • prev_log_serial (int) - Last job message serial number
  • timeout (float) - maximum time to wait in seconds