In several places, the code to convert a BeamlineConfiguration and current number file is duplicated. Now that it is required as part of multiple queries it should be extracted somewhere sensible. eg
let dir = nt
.for_beamline(&beamline, conf.tracker_file_extension())
.await?;
let high_file = dir.prev().await?;
Ok(CurrentConfiguration {
db_config: conf,
high_file,
})
could become something like
Ok(CurrentConfiguration::for_config(conf, nt).await?)
In several places, the code to convert a BeamlineConfiguration and current number file is duplicated. Now that it is required as part of multiple queries it should be extracted somewhere sensible. eg
could become something like