OpenTreeOfLife / phylesystem-api

API access to Open Tree of Life treestore
BSD 2-Clause "Simplified" License
9 stars 5 forks source link

Re-locate nudge study index #239

Open snacktavish opened 1 year ago

snacktavish commented 1 year ago

Phylesystem github webhook needs somewhere to go. Maybe recode https://github.com/OpenTreeOfLife/phylesystem-api/blob/before-pyr/controllers/search.py#L57 directly into otindex?

snacktavish commented 1 year ago

I am porting this code over to be housed in otindex to receive the webhook directly. Working on branch https://github.com/OpenTreeOfLife/otindex/tree/webhook

I'm not sure how to trigger clearing the cache though. @jimallman - any thoughts? https://github.com/OpenTreeOfLife/phylesystem-api/blob/dbd29877c9db346b8483b77dbf3292f33ba4f1de/controllers/search.py#L126

jimallman commented 1 year ago

Damn, I should have caught that. Maybe cache-clearing was the rationale for having the initial webhook handler on phylesystem-api.

I assume we don't want to bind these two services to a single machine, so a remote cache-clearing method should do the trick. I can add a (undocumented/utility) method for this to the API.

jimallman commented 1 year ago

Also, I'm planning to move the add-webhook functionality from a shell-script in phylesystem-api, to the Ansible playbook that deploys it.

snacktavish commented 1 year ago

Sounds good. I realized there is supposed to be a webhook for the amendments as well... and there needs to a be destination for that one too. Likely in otindex directly as well, I think, unless this caching stuff means that you think we should still route them through phylesystem-api, as they used to be.