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

Ruby 3 support #34

Open
thec0keman opened this issue Sep 14, 2021 · 0 comments
Open

Ruby 3 support #34

thec0keman opened this issue Sep 14, 2021 · 0 comments

Comments

@thec0keman
Copy link

thec0keman commented Sep 14, 2021

Ruby 3 added an exception whenever a class variable is overwritten through inheritance:
https://rubyreferences.github.io/rubychanges/3.0.html#changes-in-class-variable-behavior

Running with version 0.3.9, and whenever calling schedule! on a job the following exception is thrown:

.../.gem/ruby/3.0.2/gems/delayed_job_recurring-0.3.9/lib/delayed/recurring_job.rb:12:in `logger': class variable @@logger of Delayed::RecurringJob is overtaken by ActiveJob::Base (RuntimeError)
	from .../.gem/ruby/3.0.2/gems/activejob-6.1.4.1/lib/active_job/logging.rb:20:in `tag_logger'
	from .../.gem/ruby/3.0.2/gems/activejob-6.1.4.1/lib/active_job/logging.rb:14:in `block (2 levels) in <module:Logging>'
	from .../.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `instance_exec'
	from .../.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
	from .../.gem/ruby/3.0.2/gems/activesupport-6.1.4.1/lib/active_support/callbacks.rb:137:in `run_callbacks'
	from .../.gem/ruby/3.0.2/gems/activejob-6.1.4.1/lib/active_job/enqueuing.rb:55:in `enqueue'
	from .../.gem/ruby/3.0.2/gems/delayed_job-4.1.9/lib/delayed/backend/base.rb:101:in `call'
	from .../.gem/ruby/3.0.2/gems/delayed_job-4.1.9/lib/delayed/backend/base.rb:101:in `hook'
	from .../.gem/ruby/3.0.2/gems/delayed_job-4.1.9/lib/delayed/backend/base.rb:18:in `block (2 levels) in enqueue_job'
	from .../.gem/ruby/3.0.2/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:61:in `block in initialize'
	from .../.gem/ruby/3.0.2/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:66:in `execute'
	from .../.gem/ruby/3.0.2/gems/delayed_job-4.1.9/lib/delayed/lifecycle.rb:40:in `run_callbacks'
	from .../.gem/ruby/3.0.2/gems/delayed_job-4.1.9/lib/delayed/backend/base.rb:17:in `block in enqueue_job'
	from <internal:kernel>:90:in `tap'
	from .../.gem/ruby/3.0.2/gems/delayed_job-4.1.9/lib/delayed/backend/base.rb:16:in `enqueue_job'
	from .../.gem/ruby/3.0.2/gems/delayed_job-4.1.9/lib/delayed/backend/base.rb:12:in `enqueue'
	from .../.gem/ruby/3.0.2/gems/delayed_job_recurring-0.3.9/lib/delayed/recurring_job.rb:52:in `block in schedule!'

I believe this is the source of the trouble

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

1 participant