Fix build execute - in some cases one build executed with many process
This commit is contained in:
parent
37abf496d2
commit
80aa7d4c06
6 changed files with 114 additions and 26 deletions
|
|
@ -410,6 +410,27 @@ class Build extends Model
|
|||
$this->setModified('status');
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of Status / status only if it synced with db. Must not be null.
|
||||
*
|
||||
* @param $value int
|
||||
* @return bool
|
||||
*/
|
||||
public function setStatusSync($value)
|
||||
{
|
||||
$this->validateNotNull('Status', $value);
|
||||
$this->validateInt('Status', $value);
|
||||
|
||||
if ($this->data['status'] !== $value) {
|
||||
$store = Factory::getStore('Build');
|
||||
if ($store->updateStatusSync($this, $value)) {
|
||||
$this->data['status'] = $value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of Log / log.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue