heap-ruby icon indicating copy to clipboard operation
heap-ruby copied to clipboard

Add Sidekiq integration for delayed execution

Open nadavshatz opened this issue 9 years ago • 3 comments

This would be a great option to have.

Yes - I am aware of the fact that timing would be off if this happens, but this could still be worth it so the request to Heap is not blocking execution.

nadavshatz avatar Mar 21 '16 16:03 nadavshatz

For now I ended up resolving it using this in my initializer: Heap.class.__send__(:include, Sidekiq::Extensions::Klass) And then using Heap.delay.track

For some reason - the Sidekiq extensions fail to work on their own. Not sure why.

nadavshatz avatar Mar 21 '16 16:03 nadavshatz

This request seems very reasonable to me. Sadly, I don't have any experience with Sidekiq, and I don't have the time to investigate it right now. I'll leave this issue open, and hope to get to it at some point.

Please let me know if an update accidentally breaks your workaround.

pwnall avatar Mar 24 '16 02:03 pwnall

I don't think delayed execution is the responsibility of this library.

It's trivial to call Heap.track within an appropriate delayed job class for whatever implementation the end user has in their app - Sidekiq, Resque, ActiveJob, etc.

andyt avatar Dec 14 '16 21:12 andyt