Package invenio :: Module bibexport_method_fieldexporter_dblayer :: Class Job
[hide private]
[frames] | no frames]

Class Job

source code

Represents job that will run certain number of queries and save the results in a given location

Instance Methods [hide private]
 
__init__(self, job_id=-1, name='', frequency=0, output_format=0, last_run=time.struct_time(tm_year=2012, tm_mon=2, tm_mday=8, tm_hour=14..., output_directory='')
Initialize the state of the object
source code
 
get_name(self)
Returns the name of the job
source code
 
set_name(self, value)
Sets the name of the job
source code
 
get_frequency(self)
Returns the freqency of execution in hours
source code
 
set_frequency(self, value)
Sets the freqency of execution in hours
source code
 
get_output_format(self)
Returns value indicating the ouput format of the job.
source code
 
set_output_format(self, value)
Sets the output format of the job
source code
 
get_last_run(self)
Returns the last run time of the job.
source code
 
set_last_run(self, value)
Sets the last run time of the job.
source code
 
get_output_directory(self)
Returns the output directory
source code
 
set_output_directory(self, value)
Sets the output directory
source code
 
get_id(self)
Returns identifier of the job
source code
Class Variables [hide private]
  OUTPUT_FORMAT_MISSING = -1
  OUTPUT_FORMAT_MARCXML = 0
  OUTPUT_FORMAT_MARC = 1
  ID_MISSING = -1
  _id = -1
  _name = ''
  _frequency = 0
  _output_format = 0
  _last_run = time.struct_time(tm_year=2012, tm_mon=2, tm_mday=8...
  _output_directory = ''
Method Details [hide private]

__init__(self, job_id=-1, name='', frequency=0, output_format=0, last_run=time.struct_time(tm_year=2012, tm_mon=2, tm_mday=8, tm_hour=14..., output_directory='')
(Constructor)

source code 

Initialize the state of the object

Parameters:
  • job_id - id of the job
  • name - name of the job
  • frequency - frequency of execution in hours
  • last_run - last time when job has run
  • output_directory - directory where the output of the job will be stored

set_frequency(self, value)

source code 

Sets the freqency of execution in hours

Parameters:
  • value - integer representing frequency of execution in hours

get_output_format(self)

source code 

Returns value indicating the ouput format of the job.

Returns:
integer value representing output format

set_output_format(self, value)

source code 

Sets the output format of the job

Parameters:
  • value - integer indicating the output format

get_last_run(self)

source code 

Returns the last run time of the job.

Returns:
datestruct representing last run

set_last_run(self, value)

source code 

Sets the last run time of the job.

Parameters:
  • value - datestruct representing last run

Class Variable Details [hide private]

_last_run

Value:
time.struct_time(tm_year=2012, tm_mon=2, tm_mday=8, tm_hour=14, tm_min\
=58, tm_sec=31, tm_wday=2, tm_yday=39, tm_isdst=0)