* fix query in db cleaner

This commit is contained in:
Seth Call 2015-09-22 06:03:55 -05:00
parent a0feb09509
commit 032d30c3f3
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,8 @@ module JamRuby
# this needs more testing
# let's make sure jobs don't stay falsely queued for too long. 1 hour seems more than enough
JamTrackRight.where("queued = true AND (NOW() - signing_queued_at > '1 hour'::INTERVAL OR NOW() - updated_at > '1 hour'::INTERVAL").update_all(queued:false)
JamTrackRightMixdown.unscoped.where("queued = true AND (NOW() - signing_queued_at > '1 hour'::INTERVAL OR NOW() - updated_at > '1 hour'::INTERVAL").update_all(queued:false)
JamTrackRight.where("queued = true AND (NOW() - signing_queued_at > '1 hour'::INTERVAL OR NOW() - updated_at > '1 hour'::INTERVAL)").update_all(queued:false)
JamTrackRightMixdown.unscoped.where("queued = true AND (NOW() - signing_queued_at > '1 hour'::INTERVAL OR NOW() - updated_at > '1 hour'::INTERVAL)").update_all(queued:false)
return
#JamTrackRight.ready_to_clean.each do |jam_track_right|