Skip to content

Ruby 3 support #34

Description

@thec0keman

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions