hot fix: unlimited restarting build list

This commit is contained in:
Vokhmin Alexey V 2013-02-10 01:46:08 +04:00
parent 8b0116497d
commit 1a29827094
1 changed files with 2 additions and 1 deletions

View File

@ -45,8 +45,9 @@ module AbfWorker
end
def restart_task
return false if status != FAILED
redis = Resque.redis
if redis.lrem(RESTARTED_BUILD_LISTS, 0, subject.id) > 0 || status != FAILED || (options['results'] || []).size > 1
if redis.lrem(RESTARTED_BUILD_LISTS, 0, subject.id) > 0 || (options['results'] || []).size > 1
return false
else
redis.lpush RESTARTED_BUILD_LISTS, subject.id