Possible fix
parent
8b6c8fe004
commit
5c854520d6
|
@ -28,10 +28,12 @@ module Resources
|
|||
def self.step1(delivery_info, body) # Returns params or nil
|
||||
Preprocessor.from_amqp(delivery_info, body)
|
||||
rescue Mutations::ValidationException => q
|
||||
x = delivery_info.to_hash.slice(:consumer_tag,
|
||||
:redelivered,
|
||||
:exchange,
|
||||
:routing_key).merge(body: body)
|
||||
# AUTHORS NOTE: Some of the Bunny data structures have circular
|
||||
# references that will cause the JSON serializer
|
||||
# to crash. the safe_attrs var reduces the risk of
|
||||
# stack overflow during serialization.
|
||||
safe_attrs = [:consumer_tag, :redelivered, :exchange, :routing_key]
|
||||
x = delivery_info.to_hash.slice(*safe_attrs).merge(body: body)
|
||||
Rollbar.error(q, x)
|
||||
raw_chan = delivery_info&.routing_key&.split(".") || []
|
||||
id = raw_chan[INDEX_OF_USERNAME]&.gsub("device_", "")&.to_i
|
||||
|
|
Loading…
Reference in New Issue