brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.64k stars 114 forks source link

Calling job within jobs error #142

Closed JoeeGrigg closed 8 years ago

JoeeGrigg commented 8 years ago

Hi,

I have recently started using sucker punch and today have started having some issues.

When I try call a job inside another job I get an error.

Imagine I have two jobs defined, Job1 and Job2. When I try to call Job1 from inside Job2 I get the error: NameError: uninitialized constant Job2::Job1

Any ideas what this could be? Am I doing something wrong?

Joe

brandonhilkert commented 8 years ago

Sounds like a Ruby loading issue. Call Job1 with :: in front of the constant (ie. ::Job1.new.async.perform).