Skip to content

warning: already initialized constant BaseJob #45

@prashantvithani

Description

@prashantvithani

I get this warning when I start my rails console after defining the superworker.

Superworker.define(:BaseJob, :product_items, :template_hash, :user_id) do
  batch product_items: :items do
    TheJob :items, :template_hash
  end

  AnotherJob :user_id
end

and I get the below warning

/Users/prashantvithani/.rvm/gems/ruby-2.2.2/gems/sidekiq-superworker-1.2.0/lib/sidekiq/superworker/worker.rb:28: warning: already initialized constant BaseJob
/Users/prashantvithani/.rvm/gems/ruby-2.2.2/gems/sidekiq-superworker-1.2.0/lib/sidekiq/superworker/worker.rb:28: warning: previous definition of BaseJob was here

I have not defined BaseJob anywhere else except here. (I have used BaseJob as illustration, actual name is different)

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