Skip to content
Browse files

Refactor variable from 'app' to 'name' since it's only the string at …

…this point.
  • Loading branch information...
1 parent 97013bd commit 1be57abfa922192c816d46c9065cb289bb26a32d @mattconnolly committed Sep 10, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/rapns/daemon/feedback_receiver.rb
View
10 lib/rapns/daemon/feedback_receiver.rb
@@ -5,8 +5,8 @@ class FeedbackReceiver
FEEDBACK_TUPLE_BYTES = 38
- def initialize(app, host, port, poll, certificate, password)
- @app = app
+ def initialize(name, host, port, poll, certificate, password)
+ @name = name
@host = host
@port = port
@poll = poll
@@ -33,7 +33,7 @@ def stop
def check_for_feedback
connection = nil
begin
- connection = Connection.new("FeedbackReceiver:#{@app}", @host, @port, @certificate, @password)
+ connection = Connection.new("FeedbackReceiver:#{@name}", @host, @port, @certificate, @password)
connection.connect
while tuple = connection.read(FEEDBACK_TUPLE_BYTES)
@@ -56,8 +56,8 @@ def parse_tuple(tuple)
def create_feedback(failed_at, device_token)
formatted_failed_at = failed_at.strftime("%Y-%m-%d %H:%M:%S UTC")
- Rapns::Daemon.logger.info("[FeedbackReceiver:#{@app}] Delivery failed at #{formatted_failed_at} for #{device_token}")
- Rapns::Feedback.create!(:failed_at => failed_at, :device_token => device_token, :app => @app)
+ Rapns::Daemon.logger.info("[FeedbackReceiver:#{@name}] Delivery failed at #{formatted_failed_at} for #{device_token}")
+ Rapns::Feedback.create!(:failed_at => failed_at, :device_token => device_token, :app => @name)
end
end
end

0 comments on commit 1be57ab

Please sign in to comment.
Something went wrong with that request. Please try again.