There is a script src/util/call_batch_update.py which is currently run with a cronjob on our external google cloud VM instance.
The script in turn makes a request to the /api/batch_update API endpoint, which then does the batch update.
We could simplify all this to use src/util/cron.ts instead
Rough idea:
- extract the code in
src/app/api/batch_update/route.ts to a util function
- set up a cronjob in
src/app/api/batch_update/route.ts that executes that function
- remove the
src/app/api/batch_update/route.ts, endpoint. We no longer need this in the API
- remove
src/util/call_batch_update.py
- we may now be able to shut down the cloud VM instance, if it's not used for anything else
There is a script
src/util/call_batch_update.pywhich is currently run with a cronjob on our external google cloud VM instance.The script in turn makes a request to the
/api/batch_updateAPI endpoint, which then does the batch update.We could simplify all this to use
src/util/cron.tsinsteadRough idea:
src/app/api/batch_update/route.tsto a util functionsrc/app/api/batch_update/route.tsthat executes that functionsrc/app/api/batch_update/route.ts, endpoint. We no longer need this in the APIsrc/util/call_batch_update.py