Skip to content
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

Add scheduled jobs #745

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Add scheduled jobs #745

merged 2 commits into from
Sep 3, 2024

Conversation

coilysiren
Copy link
Contributor

Ticket

Resolves #525

Changes

  • Adds cron task that calls that database
  • Adds an AWS Step Functions scheduled job that calls the cron task every hour
  • Updates the documentation for the above

Testing

Tested via navapbc/platform-test#130, and triggering a step functions job manually.

image

Copy link
Contributor

@lorenyu lorenyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this is merged don't forget to:

  1. Check that template-only-cd.yml ran ok, if not you'll need to manually push changes to the platform-test* repos for the ones that failed. (Don't forget to update .template-version in the platform-test* repos if you need to do a manual update)
  2. Uncomment the cron job in platform-test (feel free to make the change directly on main, no need to open a PR)

Comment on lines 8 to 13
scheduled_jobs = {
cron = {
task_command = ["python", "-m", "flask", "--app", "app.py", "cron"]
schedule_expression = "cron(0 * ? * * *)"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the template we want this commented out since it's just an example, similar to what we did in file_upload_jobs.tf, then after this is merged in template-infra, we want to uncomment this config in platform-test so that we can exercise the functionality.

@lorenyu
Copy link
Contributor

lorenyu commented Sep 1, 2024

Another way to update platform-test if the template CD doesn't work is to:

  1. Reopen the platform-test PR
  2. Update .template-version and push
  3. Merge that PR

@lorenyu lorenyu changed the title Adds scheduled jobs Add scheduled jobs Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jobs that trigger on a schedule
2 participants