Skip to content

Instantly share code, notes, and snippets.

/t.rb

Created May 6, 2012 21:44
Show Gist options
  • Save anonymous/2624654 to your computer and use it in GitHub Desktop.
Save anonymous/2624654 to your computer and use it in GitHub Desktop.
class MyDispatchWorker < Ruote::Worker
def initialize(name, storage, allowed_participants)
super(name, storage)
@allowed_participants = allowed_participants
end
def process(msg)
return true unless DISP_ACTIONS.include?(msg['action'])
return true unless @allowed_participants.include?(msg['participant_name'])
super
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment