Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify conversion from BeamlineConfiguration to CurrentConfiguration #93

Open
tpoliaw opened this issue Feb 11, 2025 · 0 comments · May be fixed by #96
Open

Simplify conversion from BeamlineConfiguration to CurrentConfiguration #93

tpoliaw opened this issue Feb 11, 2025 · 0 comments · May be fixed by #96

Comments

@tpoliaw
Copy link
Collaborator

tpoliaw commented Feb 11, 2025

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?)
@tpoliaw tpoliaw linked a pull request Feb 12, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant