Failed paths were not cleared because the $builds query becomes empty as soon as the "finished" flag has been cleared. So this needs to be done last.
YWS3TOWASVJXM24KZFD7FQSZJ2RMASTHAYM52OAJSQYEJR44KNBAC
B3UW2ZRBXXRT4CVGLNPQJG63PQNTEY47N2C3WS56U6SDMIZKJ7HAC
2GK5DOU7ODF4WBSN3QTD3WIO52VTL2LOAXKGCDEMMAQPTEO4A4HAC
J5ITV54PZKTD3RKFB6XETFNSAJS6NRMGXNRTUYU6ASHE3EBJKENAC
VHV6GI4L2GEV2PV3AEV4C22O3JB4XUS6WPEBFINYD5CJOBMAESAAC
UOINKJ2JBCRTZPFTAXDPRJOEUWWPJ43IGVWLRIRLIGHLBMWDOGDQC
$nrRestarted = $builds->update( { finished => 0 , iscachedbuild => 0 });
$nrRestarted = $builds->update(
{ finished => 0
, iscachedbuild => 0
});