fixes remove debugs
This commit is contained in:
@@ -11,7 +11,6 @@ class CreateSpotifyActivity
|
||||
begin
|
||||
# log some info about the response with status and parts of the body
|
||||
Rails.logger.info("Response status: #{response["status"]}")
|
||||
Rails.logger.info("Response body: #{response["body"]}")
|
||||
counts = response["items"].size
|
||||
Rails.logger.info("Saving #{counts} activities")
|
||||
response["items"].reverse.each do |play|
|
||||
|
||||
@@ -42,12 +42,12 @@ class SpotifyClient
|
||||
call(path, params)
|
||||
rescue RestClient::ExceptionWithResponse => e
|
||||
if e.response.code == 401
|
||||
puts "token expired, forcing refresh"
|
||||
Rails.logger.info("token expired, forcing refresh")
|
||||
refresh_token!(force: true)
|
||||
begin
|
||||
call(path, params)
|
||||
rescue RestClient::ExceptionWithResponse
|
||||
puts "token dead"
|
||||
Rails.logger.info("token dead")
|
||||
LogLoadFailedWorker.perform_async(login.id)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user