fix: check daily if update is due based on UPDATE_INTERVAL#303
fix: check daily if update is due based on UPDATE_INTERVAL#303aaronspruit wants to merge 2 commits intortuszik:devfrom
Conversation
|
Thanks for the PR! This approach is something I have considered initially. Having the schedule reset on container restart is really not ideal. However, there are some issues with this:
I'm happy to hear your thoughts on this as I haven't found the |
|
Ah, ok, I see what you're trying to avoid. It just wasn't clear from the ENV VAR what was going on - and that the container had to be UP for the complete
Agreed. If you have the
Also agreed. I guess the issue becomes do you want people to artificially lower the Another mitigation would be around date-versioning the hosted tar and doing a lookup. I have no idea how often the dataset is actually updated on your mirror either, and so I don't know if I change Just some ideas. |
Originally updates would only be checked if they need to happen based on the duration of UPDATE_INTERVAL. This means that if the container is restarted, it resets the timer.
This change compares the timestamp on DATA_DIR/.photon-index-updated to the UPDATE_INTERVAL on a daily basis.
I believe this was the originally intended functionality, as by default it means the container needs to be running for 30 days before an update is even attempted...instead of doing updates every UPDATE_INTERVAL.
I was very confused as to why my service hadn't updated when the last time it did so was Feb 17th and UPDATE_INTERVAL=30d (even with bouncing the container). This fix correctly identified that today it's 45 days out of date and did the update.