Update sample handling and experiment linkage logic
Added `type` to experiment runs in `sample.py` and improved filtering in `processing.py` to match experiments by both `sample_id` and `run_id`. Removed extensive unnecessary code in `testfunctions.ipynb` for clarity and maintenance.
This commit is contained in:
@ -24,14 +24,17 @@ async def job_event_generator(db: Session):
|
||||
sample = db.query(SampleModel).filter_by(id=job.sample_id).first()
|
||||
experiment = (
|
||||
db.query(ExperimentParametersModel)
|
||||
.filter(ExperimentParametersModel.sample_id == sample.id)
|
||||
.filter(
|
||||
ExperimentParametersModel.sample_id == sample.id,
|
||||
ExperimentParametersModel.id == job.run_id,
|
||||
)
|
||||
.first()
|
||||
)
|
||||
|
||||
job_item = JobsResponse(
|
||||
job_id=job.id,
|
||||
sample_id=sample.id,
|
||||
run_id=getattr(experiment, "run_number", None),
|
||||
run_id=job.run_id,
|
||||
sample_name=sample.sample_name,
|
||||
status=job.status,
|
||||
type=experiment.type,
|
||||
|
Reference in New Issue
Block a user