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

Refresh Zarr cache files after ingestor is finished #133

Open
danangmassandy opened this issue Sep 5, 2024 · 1 comment
Open

Refresh Zarr cache files after ingestor is finished #133

danangmassandy opened this issue Sep 5, 2024 · 1 comment

Comments

@danangmassandy
Copy link
Collaborator

The API will cache files from zarr into a directory in /tmp. The cache directory is different for each zarr file (currently, we have CBAM and Salient zarr files). The most useful files to cache are the files for coordinates data, like the date, lat, and lon files because everytime xarray opens a dataset, it needs those files.

Currently, the cache is set to expire after 1 hour. I'm thinking to increase the expiry time because the files are not updated often. CBAM zarr file is not updated once the ingestor is finished processing 10-years NETCDF files. The Salient zarr file is only updated once a week.

The issue in this approach is that the ingestor is run on the worker container, but the cache directory is inside the django container(s). Once the data ingestor is finished updating the zarr file, we should notify the django to refresh the zarr file cache.

@danangmassandy
Copy link
Collaborator Author

This is low priority because we have set exprity time = 1H for the cache files.

@mvmaltitz mvmaltitz added this to the 1. ARD service operational milestone Sep 6, 2024
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

No branches or pull requests

2 participants