added rudimentary conductor for job execution
This commit is contained in:
25
conductors/local_python_conductor.py
Normal file
25
conductors/local_python_conductor.py
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
from typing import Any
|
||||
|
||||
from core.correctness.vars import PYTHON_TYPE, PYTHON_FUNC
|
||||
from core.correctness.validation import valid_job
|
||||
from core.meow import BaseConductor
|
||||
|
||||
|
||||
class LocalPythonConductor(BaseConductor):
|
||||
def __init__(self)->None:
|
||||
super().__init__()
|
||||
|
||||
def valid_job_types(self)->list[str]:
|
||||
return [PYTHON_TYPE]
|
||||
|
||||
# TODO expand with more feedback
|
||||
def execute(self, job:dict[str,Any])->None:
|
||||
valid_job(job)
|
||||
|
||||
job_function = job[PYTHON_FUNC]
|
||||
job_arguments = job
|
||||
|
||||
job_function(job_arguments)
|
||||
|
||||
return
|
Reference in New Issue
Block a user