gridtk.manager

Classes

JobManager([database, wrapper_script, debug])

This job manager defines the basic interface for handling jobs in the SQL database.

class gridtk.manager.JobManager(database='submitted.sql3', wrapper_script=None, debug=False)[source]

Bases: object

This job manager defines the basic interface for handling jobs in the SQL database.

lock()[source]

Generates (and returns) a blocking session object to the database.

unlock()[source]

Closes the session to the database.

get_jobs(job_ids=None)[source]

Returns a list of jobs that are stored in the database.

run_job(job_id, array_id=None)[source]

This function is called to run a job (e.g. in the grid) with the given id and the given array index if applicable.

list(job_ids, print_array_jobs=False, print_dependencies=False, long=False, print_times=False, status=('submitted', 'queued', 'waiting', 'executing', 'success', 'failure'), names=None, ids_only=False)[source]

Lists the jobs currently added to the database.

report(job_ids=None, array_ids=None, output=True, error=True, status=('submitted', 'queued', 'waiting', 'executing', 'success', 'failure'), name=None)[source]

Iterates through the output and error files and write the results to command line.

delete_logs(job)[source]
delete(job_ids, array_ids=None, delete_logs=True, delete_log_dir=False, status=('submitted', 'queued', 'waiting', 'executing', 'success', 'failure'), delete_jobs=True)[source]

Deletes the jobs with the given ids from the database.