diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-09-05 09:58:50 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-09-05 09:58:50 +0100 |
commit | d27f435e2d624503e3284246c77e8c5931c14ec5 (patch) | |
tree | 03ae888baf1ba15ac8ba5f96c0ed8c2c12d5036d /lib/tasks | |
parent | 5f2fabd35c7e4ecb02c96f72cf1068b72bb9d353 (diff) |
Add a verbosity flag to public body stats task
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/stats.rake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/tasks/stats.rake b/lib/tasks/stats.rake index 1242575fe..2a02b1716 100644 --- a/lib/tasks/stats.rake +++ b/lib/tasks/stats.rake @@ -93,8 +93,10 @@ namespace :stats do desc 'Update statistics in the public_bodies table' task :update_public_bodies_stats => :environment do + verbose = ENV['VERBOSE'] == '1' PublicBody.all.each do |public_body| - puts "Counting overdue requests for #{public_body.name}" + puts "Counting overdue requests for #{public_body.name}" if verbose + # Look for values of 'waiting_response_overdue' and # 'waiting_response_very_overdue' which aren't directly in the # described_state column, and instead need to be calculated: |