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

After update new files are not found #72

Open
3 of 7 tasks
geofranzi opened this issue Oct 31, 2024 · 0 comments
Open
3 of 7 tasks

After update new files are not found #72

geofranzi opened this issue Oct 31, 2024 · 0 comments
Assignees

Comments

@geofranzi
Copy link
Owner

geofranzi commented Oct 31, 2024

Under climate/views.py we use a global dictionary

tempfolders_content: dict[str, dict] = {}

which stores the direct access dictionaries on a per folder type basis that are returned as Json on request. To fix the issues, it was adapted:

  • force_update with a lazy load, a folder in temp_folderscontent can explicitely be refreshed now, or if empty is refreshed automatically
  • commented out single file updates for now (this is incosistent in the code, Issue will be linked here
  • explicit filesize checks on all routes that want to process file data directly (TempResultFiles)

Important: Right now a generated file is not updated when refreshing the folder normally. It only shows after force update.

Coming adaptations:

  • the folder bulk update for tempfolders_content is a mid-to-heavy operation and should be encapsuled inside FolderContentView so that no other routes can call it directly
  • normalize the single and bulk updates for tempfolders_content so that no duplicate code exists
  • re activate single file updates so that single file changes are persistently updated in tempfolders_content (Folder cache)
  • adapt the bulk request with a simple time lock to prevent excessive refreshing
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