DEV: rescue avatar rake tasks with error backtrace

This commit is contained in:
Arpit Jalan 2019-04-15 14:06:29 +05:30
parent 594674703c
commit 07b961ab13
1 changed files with 4 additions and 4 deletions

View File

@ -9,8 +9,8 @@ task "avatars:refresh" => :environment do
begin begin
user.refresh_avatar user.refresh_avatar
user.user_avatar.update_gravatar! user.user_avatar.update_gravatar!
rescue rescue => e
# skip puts "", "Failed to refresh avatar for #{user.username}", e, e.backtrace.join("\n")
end end
putc "." if (i += 1) % 10 == 0 putc "." if (i += 1) % 10 == 0
end end
@ -31,8 +31,8 @@ task "avatars:clean" => :environment do
.find_each do |optimized_image| .find_each do |optimized_image|
begin begin
optimized_image.destroy! optimized_image.destroy!
rescue rescue => e
# skip puts "", "Failed to cleanup avatar for #{user.username}", e, e.backtrace.join("\n")
end end
putc "." if (i += 1) % 10 == 0 putc "." if (i += 1) % 10 == 0
end end