Permalink
Browse files

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

…them and carry on
  • Loading branch information...
edebill-moxiesoft committed Dec 7, 2011
1 parent 7df2ec2 commit cc6763c2324a3c4854cd8e5f61b5ecbfe7acced0
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/tasks/cron.rake
View
@@ -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.