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

Steps with Await Jobs raise RuntimeError with GoodJob #94

Open
ahacop opened this issue Sep 3, 2024 · 2 comments
Open

Steps with Await Jobs raise RuntimeError with GoodJob #94

ahacop opened this issue Sep 3, 2024 · 2 comments

Comments

@ahacop
Copy link

ahacop commented Sep 3, 2024

Unfortunately, it seems like the "Await Job" feature doesn't work with GoodJob.

GoodJob will raise an exception if a job's job_id is not equal to it's provider_job_id.

https://github.com/bensheldon/good_job/blob/9a781889eb6c66d713695352e4bfd509f96bc70b/app/models/good_job/job.rb#L370

It appears that the "Await Jobs" feature relies on staging jobs, and staged jobs use a different job_id than the provider_job_id.

I'll add a repro here shortly.

@fractaledmind
Copy link
Owner

Hmmm... That sucks. I'll need to dig into good_job more and think about how to rework this feature with that constraint in mind. I don't have an idea off the top of my head tho.

@ahacop
Copy link
Author

ahacop commented Sep 3, 2024

Thanks for your response. Happy to help if I can.

I just added an additional test to the repro I made for #92, here: https://github.com/ahacop/acidic-job-good-job-repro/blob/efe69774eae689d2f073cc66b96fe33ece6d57e2/test/jobs/await_job_test.rb

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

No branches or pull requests

2 participants