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

Newest release of delayed_job_active_record breaks loading of delayed_job_groups_plugin #17

Closed
hoenth opened this issue Jan 2, 2021 · 1 comment

Comments

@hoenth
Copy link
Contributor

hoenth commented Jan 2, 2021

In version 4.15 of delayed_job_active_record, they have removed loading the Configure and Job classes until after initialization (collectiveidea/delayed_job_active_record#172).

This means that the Job class is not loaded with delayed_job_groups_plugin tries to access it on line 14 of lib/delayed_job_groups_plugin.rb.

Other related libraries have encountered the same issue, such as delayed_cron_job (codez/delayed_cron_job#27).

Seems we could follow the same pattern as delayed_cron_job and check for defined?(Rails::Railtie) and if so, require a railtie file that waits until after initialization to Delayed::Backend::ActiveRecord::Job.send(:include, Delayed::JobGroups::JobExtensions)

If that makes sense, I am happy to work on it and issue a PR

@will89
Copy link
Contributor

will89 commented Jan 28, 2022

Fixed with #18.

@will89 will89 closed this as completed Jan 28, 2022
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