Skip to content

Conversation

@andrew-nowak
Copy link
Member

Reopening of #1670

Currently Amigo will rebake recipes based on a Quartz cron schedule. Unfortunately, bakes can fail or timeout if too many are running at once, which means that users sometimes need to hunt for a free slot, or adjust the scheduling of many recipes to get them all to play nicely.

We've had similar problems in the Grid when people try to upload many images all in one go. The architectural solution we've implemented there is to queue jobs, allowing the app to restrict its concurrency and limit the number of jobs running at any one time.

Once we're doing this though, there seems little need for the precision of a Cron expression - we always schedule weekly bakes, so besides the choice of day do we really care exactly what hour/minute it starts? Instead, only prompt the user to select a day, and then shortly after midnight, have Amigo find and schedule the bakes for that day's recipes.

What does this change?

How to test

What is the value of this?

Have we considered potential risks?

Note
If this change adds, updates or removes a role or recipe please note that in your PR and assign appropriate reviewers for the team that will be impacted by those changes.

Currently Amigo will rebake recipes based on a Quartz cron schedule.
Unfortunately, bakes can fail or timeout if too many are running at
once, which means that users sometimes need to hunt for a free slot, or
adjust the scheduling of many recipes to get them all to play nicely.

We've had similar problems in the Grid when people try to upload many
images all in one go. The architectural solution we've implemented there
is to queue jobs, allowing the app to restrict its concurrency and limit
the number of jobs running at any one time.

Once we're doing this though, there seems little need for the precision
of a Cron expression - we always schedule weekly bakes, so besides the
choice of day do we really care exactly what hour/minute it starts?
Instead, only prompt the user to select a day, and then shortly after
midnight, have Amigo find and schedule the bakes for that day's recipes.
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

@andrew-nowak andrew-nowak force-pushed the an/queue-based-scheduling branch from 6f6d6f4 to 74d51a5 Compare November 21, 2025 13:29
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.

2 participants