Skip to content

Instantly share code, notes, and snippets.

@tomwans
Created July 17, 2015 17:11
Show Gist options
  • Save tomwans/73f8a5639ec8f0401265 to your computer and use it in GitHub Desktop.
Save tomwans/73f8a5639ec8f0401265 to your computer and use it in GitHub Desktop.
receive_messages.map do |msg|
if msg.message_attributes[PIPE_STR].string_value == KEEPALIVES_STR
# causes bug -> EM.defer { @keepalives_callback.call(msg, msg.body) }
@keepalives_callback.call(msg, msg.body)
else
# causes bug -> EM.defer { @results_callback.call(msg, msg.body) }
@results_callback.call(msg, msg.body)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment