Created
February 22, 2011 09:27
-
-
Save JonasNielsen/838411 to your computer and use it in GitHub Desktop.
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
# Inside EM::Connection 'receive_data(d)' loop | |
logger.debug "New price received" | |
extraction = proc { | |
logger.debug "Extracting price info" | |
extract_price_information(response) # Use libxml to match response with a schema and extract values | |
} | |
callback = proc { |price| | |
push_to_pusher(price) # Uses pusherapp to broadcast price | |
} | |
EM.defer(extraction, callback) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment