Skip to content

Instantly share code, notes, and snippets.

@coffeeaddict
Created July 20, 2012 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coffeeaddict/3150714 to your computer and use it in GitHub Desktop.
Save coffeeaddict/3150714 to your computer and use it in GitHub Desktop.
class RuoteObserver
def initialize(context, options={})
end
def on_msg(msg)
case msg['action']
when 'launch'
msg['launched_at'] = Time.now
when 'terminated'
Project.logger.debug "{#{msg['wfid']}} [#{msg['workitem']['wf_name']}] took %.2fs" % (Time.now - msg['launched_at'])
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment