heap-ruby
heap-ruby copied to clipboard
Add Sidekiq integration for delayed execution
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.
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.
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.
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.