sul-dlss / FOLIO-Project-Stanford

Task management for Stanford’s analysis of FOLIO.
2 stars 0 forks source link

need solution to periodically run a mod-patron-blocks re-sync job #590

Open shelleydoljack opened 6 months ago

shelleydoljack commented 6 months ago

See https://issues.folio.org/browse/MODPATBLK-160

A DAG in libsys-airflow might be too much overhead. We just need:

POST /automated-patron-blocks/synchronization/job
body:

{
  "scope": "full"
}

Maybe a task in folio-tasks? Or a cronjob in k8s cluster?

shelleydoljack commented 6 months ago

Discussed at standup: we should create a DAG that will run tasks on a monthly basis. This will be the first of many (probably). We should add some sort of email reporting when it is kicked off. Probably should monitor the job for errors.

jgreben commented 5 months ago

I think a k8s cronjob would be easier with no coding involved. It would just involve creating a secret with a user and password for a token, and a single pod definition with two curl commands, one to get a token and one to do the post.

jgreben commented 5 months ago

https://github.com/sul-dlss/folio-k8s/blob/poppy-upgrade/re-sync-patron-blocks-cron.yaml

jgreben commented 5 months ago

Tested that successfully on dev. I am finding out if ops can configure a email alert to tell us if/when a cronjob fails.

jgreben commented 5 months ago

Shelley reminded me that there will be other jobs, not just this one, which in that case a DAG could be more useful.