added standardised job creation
This commit is contained in:
11
core/vars.py
11
core/vars.py
@ -85,6 +85,7 @@ DEFAULT_JOB_QUEUE_DIR = "job_queue"
|
||||
DEFAULT_JOB_OUTPUT_DIR = "job_output"
|
||||
|
||||
# meow jobs
|
||||
JOB_FILE = "job.sh"
|
||||
JOB_TYPE = "job_type"
|
||||
JOB_TYPE_BASH = "bash"
|
||||
JOB_TYPE_PYTHON = "python"
|
||||
@ -125,6 +126,7 @@ JOB_REQUIREMENTS = "requirements"
|
||||
JOB_PARAMETERS = "parameters"
|
||||
|
||||
# job statuses
|
||||
STATUS_CREATING = "creating"
|
||||
STATUS_QUEUED = "queued"
|
||||
STATUS_RUNNING = "running"
|
||||
STATUS_SKIPPED = "skipped"
|
||||
@ -157,12 +159,3 @@ def get_not_imp_msg(parent_class, class_function):
|
||||
return f"Children of the '{parent_class.__name__}' class must implement " \
|
||||
f"the '{class_function.__name__}({signature(class_function)})' " \
|
||||
"function"
|
||||
|
||||
def get_base_file(job_type:str):
|
||||
return JOB_TYPES[job_type][0]
|
||||
|
||||
def get_job_file(job_type:str):
|
||||
return JOB_TYPES[job_type][1]
|
||||
|
||||
def get_result_file(job_type:str):
|
||||
return JOB_TYPES[job_type][2]
|
||||
|
Reference in New Issue
Block a user