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

Complete webhook updates #61

Open
snacktavish opened this issue Jul 21, 2023 · 5 comments
Open

Complete webhook updates #61

snacktavish opened this issue Jul 21, 2023 · 5 comments

Comments

@snacktavish
Copy link
Member

Studies github webhook route is working - but isn't checking that the docstore matches

https://github.com/OpenTreeOfLife/otindex/blob/webhook/otindex/views.py#L277

Also, route for taxon amendments doesn't exist yet.
(although I started a stub)

@snacktavish
Copy link
Member Author

Cache clearing code now exists! should be called by otindex. {API base URL}/clear_cache_keys/{key OR regular expression}

Example: https://devapi.opentreeoflife.org/clear_cache_keys/^clearme.*
[needs URL-encoding beforehand]

@jimallman What would clearing the study list for the curator look like? (https://api.opentreeoflife.org/cached/v3/studies/find_studies verbose=true)

@jimallman
Copy link
Member

jimallman commented Aug 1, 2023

Try the new API method, i.e. https://devapi.opentreeoflife.org/clear_cache_keys/.*find_studies.*

@snacktavish
Copy link
Member Author

Right after that, call https://devapi.opentreeoflife.org/cached/find_studies, to refresh the cache.

@jimallman
Copy link
Member

That refresh call probably needs some additional query-string args; see the footer details on devtree curator...

@jimallman
Copy link
Member

@snacktavish OK, here's a (simplified) cURL call that's equivalent to what the web-app actually requests.

curl 'https://devapi.opentreeoflife.org/cached/v3/studies/find_studies' \
  -X 'POST' \
  -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
  -H 'Accept: application/json, text/javascript, */*; q=0.01' \
  -H 'Cache-Control: no-cache' \
  --data 'verbose=true'

The more closely you can match this call, the more likely you'll populate the cache with a complete and correct cache key.

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