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

Switch to GoodJob for background work #1553

Merged
merged 11 commits into from
Jun 25, 2024
Merged

Switch to GoodJob for background work #1553

merged 11 commits into from
Jun 25, 2024

Conversation

phinze
Copy link
Contributor

@phinze phinze commented Jun 18, 2024

What it does

Why it is important

  • GoodJob gives us a few implementation benefits over Sucker Punch
    • It's Postgres-backed, so in-flight jobs won't be lost on server restart
    • It can be configured with an external worker, which will reduce memory pressure on the web dyno
    • It includes scheduled job features, which will let us migrate from Heroku Scheduler to jobs defined in code
    • It includes a dashboard we can use to debug potential issues with background jobs

Implementation notes

  • We will now have a persistent worker dyno running in both staging and production, which will add $14/mo ($168/yr) to our hosting costs. Initial discussion amongst the team has concluded this is a worthwhile tradeoff for the above benefits.
  • The Heroku Scheduler to GoodJob Cron conversion will come in a future PR, assuming this transition goes well.

Copy link
Member

@jim jim left a comment

Choose a reason for hiding this comment

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

LGTM! I'm excited to have. real background work system.

phinze added 11 commits June 22, 2024 12:59
perform_async is sidekiq and sucker punch specific
Capturing some learning as I've investigated issues around GoodJob and
ActsAsTenant
This works around an upstream issue in ActsAsTenant which is marked in a
comment. I'm hoping to help fix the issue upstream so we'll catch the
fix in an update.

In the meantime we should be fine with this change.
@phinze phinze force-pushed the phinze/good-job branch from 1801afb to 6dffdb0 Compare June 22, 2024 17:59
@phinze phinze merged commit c6786c1 into main Jun 25, 2024
9 checks passed
@phinze phinze deleted the phinze/good-job branch June 25, 2024 00:30
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