Closed jimallman closed 1 year ago
@snacktavish NB - Regarding the amendments webhook, the old (pre-Pyramid) handler is on branch before-pyr
, and of course it's currently failing. More importantly, I don't believe we're currently caching amendments or taxa, so it's moot for now.
I'll comment this out in the Ansible playbook, but keep the main (study) webhook. I believe this is pointing to the correct (new) URL.
@snacktavish I spoke too soon! It looks like the amendments webhook handler doesn't just clear stale amendments from the cache -- it also does some processing via v3/taxonomy/process_additions
. I'll check to see if this method is in the currently deployed code.
EDIT: I found this old method in taxomachine. I'm guessing there's a newer implementation that we should call instead..? Or we need to write one.
Yep - we need to put it into otindex. I made an issue here: https://github.com/OpenTreeOfLife/otindex/issues/61
And I pulled the code that was in phylesystem API here: https://github.com/OpenTreeOfLife/otindex/blob/webhook/otindex/views.py#L338
But haven't had a chance to look at the taxon updates yet. Feel free to take a crack at it if you want!
NB - Managing Github webhooks requires the Ansible user to have a valid personal access token on their local filesystem, at ~/.ssh/opentree/OPENTREEAPI_OAUTH_TOKEN
. Or put it anywhere, and update the local_api_token_path
variable to match.
These changes are working now on devtree/devapi. Ready to merge?
This should install an appropriate webhook to update otindex when a study is saved in the curation app.