Skip to content

Simplify conversion from BeamlineConfiguration to CurrentConfiguration #93

@tpoliaw

Description

@tpoliaw

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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions