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

[Bug]: Configuration for locations loads twice #535

Closed
1 task done
vaughanknight opened this issue Jun 25, 2024 · 2 comments
Closed
1 task done

[Bug]: Configuration for locations loads twice #535

vaughanknight opened this issue Jun 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@vaughanknight
Copy link
Contributor

Contact Details

No response

What happened?

The configuration for locations loads twice at startup, it's visible in the logs with suffixed locations being loaded at startup i.e. westus, and then westus_1. It happens for all configured location files.

client

WebAPI (Default)

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@vaughanknight vaughanknight added the bug Something isn't working label Jun 25, 2024
@YaSuenag
Copy link
Member

I saw same issue, and I created a patch (but I've not sent it as a PR): YaSuenag@84662a4

Maybe it happens when both EmissionsDataSource and ForecastDataSource are defined.
LocationSource would be loaded when each data source are prepared, so same location JSON would be loaded by preparation phase of both EmissionsDatasource and ForecastDataSource.

My patch adds HashSet to remember loaded location JSONs, so it prevents to load in twice.

I can send PR if you want.

@danuw
Copy link
Collaborator

danuw commented Jul 9, 2024

Fixed as part of #532 not to load twice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants