Permalink
Browse files

Silencing AR logger when we we're retrieving

  • Loading branch information...
1 parent 5a0770f commit c54f7488882242fad0d76830a3fe2b097c5d1e88 @ragalie committed Aug 18, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/workling/clients/active_record_client.rb
@@ -58,7 +58,11 @@ def retrieve(key)
# Need to use update_all and check return value to avoid deadlock
if job
- count = WorklingJob.update_all ["status = ?", "processing"], ["id = ?", job.id]
+ count = nil
+ ActiveRecord::Base.silence do
+ count = WorklingJob.update_all ["status = ?", "processing"], ["id = ?", job.id]
+ end
+
if count == 1
status = Thread.current[:status]
job.status = "processing"

0 comments on commit c54f748

Please sign in to comment.