Skip to content

Feat: Stuck background job #6526

Open
matzduniuk wants to merge 6 commits into
mainfrom
6393/stuck-job-recovery
Open

Feat: Stuck background job #6526
matzduniuk wants to merge 6 commits into
mainfrom
6393/stuck-job-recovery

Conversation

@matzduniuk

Copy link
Copy Markdown
Collaborator

This PR addresses #6393

  • Addresses the issue in full
  • Addresses only certain aspects of the issue

Description

  • Sets up an automated CRON job for background jobs running every 30 minutes.
  • Adds a background job handler to the background jobs service class
  • Adds integration tests for the new service method

How Can This Be Tested/Reviewed?

  1. Set up the BACKGROUND_JOBS_RECOVERY_CRON_STRING environment variable for your local setup (The string value may be copied from the env.template file or set as 0/5 * * * * for quicker execution)
  2. Run the background application
  3. Using API testing tools like Postman or directly through Prisma Studio setup a currently processing background job record
  4. (Optional) - If the background job was created through the endpoint, the updatedAt can be updated to an older date for quicker testing.
  5. Verify the background job has been deleted from the database after the elapsed time (Additionally, the CronJobs table can be used for validating proper periodic job execution)

Author Checklist:

  • Added QA notes to the issue with applicable URLs
  • Reviewed in a desktop view
  • Reviewed in a mobile view
  • Reviewed considering accessibility
  • Added tests covering the changes
  • Made corresponding changes to the documentation
  • Ran yarn generate:client and/or created a migration when required

Review Process:

  • Read and understand the issue
  • Ensure the author has added QA notes
  • Review the code itself from a style point of view
  • Pull the changes down locally and test that the acceptance criteria is met
  • Either (1) explicitly ask a clarifying question, (2) request changes, or (3) approve the PR, even if there are very small remaining changes, if you don't need to re-review after the updates

@matzduniuk matzduniuk self-assigned this Jul 17, 2026
@matzduniuk matzduniuk added the 1 review needed Requires 1 more review before ready to merge label Jul 17, 2026
@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for bloom-angelopolis canceled.

Name Link
🔨 Latest commit 8d11fd0
🔍 Latest deploy log https://app.netlify.com/projects/bloom-angelopolis/deploys/6a5a275f8b429700083fd7b5

@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for partners-bloom-dev ready!

Name Link
🔨 Latest commit 8d11fd0
🔍 Latest deploy log https://app.netlify.com/projects/partners-bloom-dev/deploys/6a5a275f8b429700083fd7b0
😎 Deploy Preview https://deploy-preview-6526--partners-bloom-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for bloom-exygy-dev ready!

Name Link
🔨 Latest commit 8d11fd0
🔍 Latest deploy log https://app.netlify.com/projects/bloom-exygy-dev/deploys/6a5a275fdeb47900084d7175
😎 Deploy Preview https://deploy-preview-6526--bloom-exygy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 review needed Requires 1 more review before ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant