Refactor job model and endpoints for improved structure

Updated the job model to include `sample_id` and `run_id` fields, replacing `experiment_parameters_id`. Adjusted relationships and modified routers to reflect these changes. Added an endpoint for updating job status and restructured job streaming logic to include detailed experiment and sample data.
This commit is contained in:
GotthardG
2025-04-29 14:43:39 +02:00
parent 3eb4050d82
commit 9af2e84f9e
7 changed files with 154 additions and 142 deletions

View File

@ -351,8 +351,9 @@ def create_experiment_parameters_for_sample(
db.commit()
new_job = JobModel(
experiment_parameters_id=new_exp.id, # <-- Correct reference here
parameters=new_exp, # assuming params has a to_dict() method
sample_id=sample_id,
run_id=new_exp.id,
experiment_parameters=new_exp, # not sure yet
status=JobStatus.TODO,
)
db.add(new_job)