com web/rmtools: These should be atomic, too: include/Branch.php
| From: | Anatol Belski | Date: | Tue, 19 Sep 2017 10:23:01 +0000 |
| Subject: | com web/rmtools: These should be atomic, too: include/Branch.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-26414@lists.php.net to get a copy of this message | ||
Commit: fd4448d3d3edae90a186c859bebfccbd197d555e
Author: Anatol Belski <ab@php.net> Tue, 19 Sep 2017 12:23:01 +0200
Parents: b8f48f651c5e80d2a877316becc75a6a25ee6c6f
Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=fd4448d3d3edae90a186c859bebfccbd197d555e
Log:
These should be atomic, too
Changed paths:
M include/Branch.php
Diff:
diff --git a/include/Branch.php b/include/Branch.php
index b87c38d..6cf84aa 100644
--- a/include/Branch.php
+++ b/include/Branch.php
@@ -346,14 +346,14 @@ class Branch {
function buildFinished()
{
- $this->data = $this->readdata();
+ $this->data = $this->atomicDataRW(true, true);
$this->data->build_num++;
- $this->writeData();
+ $this->atomicDataRW(false, true);
}
function resetBuildInfo()
{
- if (self::REQUIRED_BUILDS_NUM <= $this->numBuildsRunning()) {
+ if ($this->requiredBuildRunsReached()) {
$this->data = $this->readdata();
$this->data->build_num = 0;
$this->data->builds = array();