breamware / sidekiq-batch

Sidekiq Batch Jobs Implementation
MIT License
357 stars 95 forks source link

Callbacks can now handle string with a class and a method Class#Method #4

Closed arjenbrandenburgh closed 7 years ago

arjenbrandenburgh commented 7 years ago

3

nglx commented 7 years ago

That's a good catch however the implementation does not distinguish the event that'll be fired. Running:

batch.on(:complete, 'AnotherClass#method', 'uid' => current_user.id)

will run method on both complete and success.

nglx commented 7 years ago

@cybey that's a good work. By any chance can you add a spec that covers the scenario when callback has a method name (specified with #)?

nglx commented 7 years ago

Hey @cybey can you catch up with latest master? (It has the fixes related to codeclimate/simplecov). Thanks!