Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revised SQL query returning next pool metadata to fetch
There are two fundamentals change here: a) This now does a LEFT JOIN on the fetch attempts table on BOTH the metadata_hash and metadata_url. Before, we would discard metadata based solely on their metadata_hash. Now, we select on the joined table directly and keep all pool metadata with either no fetch attempts, or a fetch_after that is prior to the current datetime. b) It now _sorts_ the result based on their fetch_after date, the most "urgent" first. This is to cope with the arbitrary batch limit of 100 pools and make sure that all metadata are eventually fetched. Before, we could potentially retry fetching the same metadata over and over again until they expire.
- Loading branch information