1
0

more fine grained transactions in EGG:RemoteSource:update
All checks were successful
Build Docker and Deploy / Build Docker (push) Successful in 1m38s
Build Docker and Deploy / Deploy to Server (push) Successful in 19s

This commit is contained in:
Mike Schwörer 2025-07-14 09:47:41 +02:00
parent e5c9b1c2a0
commit 1410f3b051
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF

View File

@ -56,14 +56,14 @@ abstract class StandardGitConnection implements IRemoteSource
$anyChanged = false; $anyChanged = false;
foreach ($repos as $repo) foreach ($repos as $repo)
{
$db->beginTransaction();
{ {
$branches = $this->listAndUpdateBranches($db, $repo); $branches = $this->listAndUpdateBranches($db, $repo);
$db->setUpdateDateOnRepository($repo); $this->logger->proclog("Found " . count($branches) . " nin Repo: [" . $repo->Name . "]");
$repo_changed = false;
foreach ($branches as $branch) foreach ($branches as $branch)
{
$db->beginTransaction();
{ {
if ($branch->HeadFromAPI === $branch->Head) if ($branch->HeadFromAPI === $branch->Head)
{ {
@ -82,15 +82,15 @@ abstract class StandardGitConnection implements IRemoteSource
$this->logger->proclog("Found " . $updateCount . " new commits in Branch: [" . $this->name . "|" . $repo->Name . "|" . $branch->Name . "]"); $this->logger->proclog("Found " . $updateCount . " new commits in Branch: [" . $this->name . "|" . $repo->Name . "|" . $branch->Name . "]");
$repo_changed = true; $anyChanged = true;
$db->setChangeDateOnBranch($branch); $db->setChangeDateOnBranch($branch);
$db->setChangeDateOnRepository($repo);
$db->setUpdateDateOnRepository($repo);
} }
if ($repo_changed) $db->setChangeDateOnRepository($repo);
if ($repo_changed) $anyChanged = true;
}
$db->commitTransaction(); $db->commitTransaction();
}
} }
if ($anyChanged) if ($anyChanged)