Created
July 20, 2012 13:27
-
-
Save coffeeaddict/3150714 to your computer and use it in GitHub Desktop.
This file contains 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
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