woom.job.Job

Contents

woom.job.Job#

class woom.job.Job(manager, name, script, args, queue=None, jobid=None, submission_date=None, status='UNKNOWN', subproc=None, artifacts=None, submission_dir=None, blocking=True)[source]#

Single job

Parameters:
  • manager (JobManager) – Job manager instance

  • name (str) – Job name

  • script (str) – Path to job script

  • args (list) – Command line arguments

  • queue (str, optional) – Queue name

  • jobid (str, optional) – Job identifier

  • submission_date (str, optional) – Date of submission

  • status (str or JobStatus, optional) – Job status

  • subproc (subprocess.Popen, optional) – Subprocess object for background jobs

  • artifacts (dict, optional) – Job artifacts

  • submission_dir (str, optional) – Submission directory path

  • blocking (bool, optional) – Whether job is blocking

__init__(manager, name, script, args, queue=None, jobid=None, submission_date=None, status='UNKNOWN', subproc=None, artifacts=None, submission_dir=None, blocking=True)[source]#

Attributes

files

dict of job files like script, status, out, err and json

overview_format

Methods

dump([json_file])

Export to json in job script directory

get_overview([update])

get_overview_header()

get_status([fallback])

Query and set the status of this job

is_running()

kill([graceful, timeout])

Kill the job, optionally trying graceful termination first

load(manager, json_file[, append])

Load a job into a manager from a json file

query_status()

Query the status

set_status(status[, fallback])

Set the status of this job without query

to_dict()

wait()

Wait for a job to finish