Last active
June 27, 2019 21:02
-
-
Save zedtux/d94b6d30dcf4ef30ca79d8b553418627 to your computer and use it in GitHub Desktop.
Overrides of the Sidekiq method to delete a job, transmit via ActionCable to the UI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sidekiq/api' | |
module Sidekiq | |
class JobSet < SortedSet | |
alias :old_delete_by_value :delete_by_value | |
def delete_by_value(name, value) | |
parsed = JSON.parse(value) | |
CommisChannel::BackgroundTasks.broadcast_delete(parsed['jid']) | |
old_delete_by_value(name, value) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment