silence a log

Andrew Cantino 11 years ago
parent
commit
9fb53c4f64
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/models/agents/human_task_agent.rb

+ 3 - 1
app/models/agents/human_task_agent.rb

@@ -169,7 +169,9 @@ module Agents
169 169
     def review_hits
170 170
       reviewable_hit_ids = RTurk::GetReviewableHITs.create.hit_ids
171 171
       my_reviewed_hit_ids = reviewable_hit_ids & (memory[:hits] || {}).keys.map(&:to_s)
172
-      log "MTurk reports #{reviewable_hit_ids.length} HITs, of which I own [#{my_reviewed_hit_ids.to_sentence}]"
172
+      if reviewable_hit_ids.length > 0
173
+        log "MTurk reports #{reviewable_hit_ids.length} HITs, of which I own [#{my_reviewed_hit_ids.to_sentence}]"
174
+      end
173 175
       my_reviewed_hit_ids.each do |hit_id|
174 176
         hit = RTurk::Hit.new(hit_id)
175 177
         assignments = hit.assignments