From 07b961ab13147db47fd029d7e95a6d286d2e32ce Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 15 Apr 2019 14:06:29 +0530 Subject: [PATCH] DEV: rescue avatar rake tasks with error backtrace --- lib/tasks/avatars.rake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tasks/avatars.rake b/lib/tasks/avatars.rake index 28f84f8aad0..af03fd5dc5b 100644 --- a/lib/tasks/avatars.rake +++ b/lib/tasks/avatars.rake @@ -9,8 +9,8 @@ task "avatars:refresh" => :environment do begin user.refresh_avatar user.user_avatar.update_gravatar! - rescue - # skip + rescue => e + puts "", "Failed to refresh avatar for #{user.username}", e, e.backtrace.join("\n") end putc "." if (i += 1) % 10 == 0 end @@ -31,8 +31,8 @@ task "avatars:clean" => :environment do .find_each do |optimized_image| begin optimized_image.destroy! - rescue - # skip + rescue => e + puts "", "Failed to cleanup avatar for #{user.username}", e, e.backtrace.join("\n") end putc "." if (i += 1) % 10 == 0 end