-
Notifications
You must be signed in to change notification settings - Fork 0
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
Injest enrichment into K10plus #10
Comments
Should there be a check whether the same enrichment is already in the queue? Or should we simply hope that people won't get impatient? 😅 |
Implemented! POST /enrichment
GET /enrichment/:id
GET /enrichment
No DELETE /enrichment/:id at this point. It's open whether files will be manually deleted using something like a cronjob that checks whether enrichments were actually written into the catalogue. Currently, enrichments will pile up, but it shouldn't be an issue in the beginning. I also adjusted the frontend so that success and error messages are displayed in a better way. You can test it here: https://coli-conc.gbv.de/coli-rich/dev/ / https://coli-conc.gbv.de/coli-rich/dev/enrichment |
It turns out we can have no simple HTTP API to write PICA+ to K10plus. Instead the process will be as following, a little bit more complicated:
enrichment
enrichment
is called via POST with client functionsubmitEnrichments
. The API endpoint checks token and payload. On success itenrich/$UUID
enrichment/$UUID
for existing UUID in the queue return the enrichment payload and its creation timestamp as HTTP headerenrichment
returns a list of entries in the queue (plain text list of URLs followed by space, followed by timestamp)enrichment/$UUID
for existing UUID is only allowed from localhostThis way a script at K10plus server (called every minute or more frequently) can query for new enrichments to be injested. Purging of enrichment queue is not taks of this script.
This is enough to start with a first version. For full production we need a method to purge the queue of enrichments. This can be done by a cronjob calling a script from coli-rich-web directory to cycle through enrichments, whether they have been applied (retrieve PICA record via PPN and check contents), and delete if done so.
The text was updated successfully, but these errors were encountered: