Skip to content

Move from call_batch_update.py to cron.ts #170

@foolo

Description

@foolo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions