Skip to content

Instantly share code, notes, and snippets.

@takai
Created November 3, 2011 05:30
Show Gist options
  • Save takai/1335840 to your computer and use it in GitHub Desktop.
Save takai/1335840 to your computer and use it in GitHub Desktop.
require 'eventmachine'
require 'ruote/worker'
module Ruote
class EMWorker < Worker
def run
EM.add_periodic_timer(1) do
step
end
end
def run_in_thread
raise NotImplementedError, 'EMWorker#run_in_thread'
end
def shutdown
EM.stop
end
def take_a_rest(msgs_processed)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment