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

How often do the different ETN resources update? #282

Open
PietrH opened this issue Jun 20, 2023 · 2 comments
Open

How often do the different ETN resources update? #282

PietrH opened this issue Jun 20, 2023 · 2 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@PietrH
Copy link
Member

PietrH commented Jun 20, 2023

Some resources in ETN are called time and time again within functions, which leads me to believe it might save users time, and server resources if the values of these resources could be retained for a while, and only updated after a set time interval.

For example, how often is the list of scientific_names actually updated? If we've just requested this list, could we store it for an hour and only afterwards check the database again? Every 4 hours? Every 10 minutes?

What about the detections table? Is the view updated on every call, or only nightly?

function_name update_interval
list_acoustic_project_codes ?
list_acoustic_tag_ids ?
list_animal_ids ?
list_animal_project_codes ?
list_cpod_project_codes ?
list_deployment_ids ?
list_receiver_ids ?
list_scientific_names ?
list_station_names ?
list_tag_serial_numbers ?
list_values ?
get_acoustic_deployments ?
get_acoustic_detections ?
get_acoustic_projects ?
get_acoustic_receivers ?
get_animal_projects ?
get_animals ?
get_cpod_projects ?
get_tags ?

Ideally I'd like to know this on a function by function basis. @CLAUMEMO do you have enough information to answer this question? I could go trough the inner workings and make an overview of what function calls what table, but while useful it would take a bit of effort.

@PietrH PietrH added question Further information is requested help wanted Extra attention is needed labels Jun 20, 2023
@CLAUMEMO
Copy link

CLAUMEMO commented Jul 4, 2023

I believe all of the views used in these funtions get updated on every call. @bart-v can you confirm?

@bart-v
Copy link

bart-v commented Jul 4, 2023

Most of them will be updated in real time, indeed.
Some detection tables might be materialized views and are updated daily.

I don't see any issue with caching them for i.e. 1 day or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants