Skip to content
Browse files

don't let failures on individual repositories stop the process - log …

…them and carry on
  • Loading branch information...
1 parent 7df2ec2 commit cc6763c2324a3c4854cd8e5f61b5ecbfe7acced0 @edebill-moxiesoft edebill-moxiesoft committed Dec 6, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/tasks/cron.rake
View
8 lib/tasks/cron.rake
@@ -1,7 +1,11 @@
desc "This task runs nightly"
task :cron => :environment do
Repository.all.each do |r|
- r.update_count
- r.update_stats
+ begin
+ r.update_count
+ r.update_stats
+ rescue => e
+ Rails.logger.error("error updating #{r.name} - #{e.inspect}")
+ end
end
end

0 comments on commit cc6763c

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