Fix build error on invalid build list, reset builder on restart
This commit is contained in:
parent
3243bbb6af
commit
ef275786cf
|
@ -21,8 +21,7 @@ module AbfWorker
|
||||||
fill_container_data if status != STARTED
|
fill_container_data if status != STARTED
|
||||||
|
|
||||||
unless subject.valid?
|
unless subject.valid?
|
||||||
subject.build_error(false)
|
subject.update_attribute(:status, BuildList::BUILD_ERROR)
|
||||||
subject.save(validate: false)
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -80,6 +79,7 @@ module AbfWorker
|
||||||
else
|
else
|
||||||
Redis.current.lpush RESTARTED_BUILD_LISTS, subject.id
|
Redis.current.lpush RESTARTED_BUILD_LISTS, subject.id
|
||||||
subject.update_column(:status, BuildList::BUILD_PENDING)
|
subject.update_column(:status, BuildList::BUILD_PENDING)
|
||||||
|
subject.update_column(:builder_id, nil)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue