|
Methods defined here:
- __init__(self, scheduler)
- initiates the JobHandler with the Scheduler class
Parameters
----------
scheduler
type: Scheduler
currently active Scheduler class from scheduler module
- add_job(self)
- Provides CLI for a single job addition and then calls insert_jobs with the data
Returns
-------
- display_jobs(self)
- displays the list of scheduled jobs by calling appropriate
Scheduler method
Returns
-------
- insert_jobs(self, db_cur, job_data)
- passes job data to add_recording_job method of Scheduler class.
Parameters
----------
db_cur
type: sqlite database cursor
cursor to the database of channels
job_data
type: dict
dict containing channel with data as in the add_job function
Returns
-------
- load_jobs(self, data)
- loads data from a file which contains jobs
Segregates them based on the dictionary key and then passes the dictionary to
appropriate functions in JobHandler.
Parameters
----------
data
type: dict
contains the list of new jobs to be added to database
Returns
-------
type: bool
True if operations were successful, False otherwise
- rm_jobs(self, job_data)
- removes a job from the schedule
Parameters
----------
job_data
type: dict
dict containing the list of jobs to be added
Returns
-------
Static methods defined here:
- to_weekday(entry)
- converts the integer group to weekday string
Parameters
----------
entry
type: str
integer from, eg. 0001000 for only wednesday
Returns
-------
type: str
string containing short forms of weekdays
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|