aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-04-17 20:33:31 +0300
committerArthur Zamarin <arthurzam@gentoo.org>2024-04-17 20:33:31 +0300
commit98e00c2ebda083efe62c9acf03078e026782d894 (patch)
tree1e0e28628f086e22c4a4e1a9fe3ca8a9d99d104f
parentatom feeds: fix escaping of xml (diff)
downloadsoko-98e00c2ebda083efe62c9acf03078e026782d894.tar.gz
soko-98e00c2ebda083efe62c9acf03078e026782d894.tar.bz2
soko-98e00c2ebda083efe62c9acf03078e026782d894.zip
updater/commits: fix bug when >10K commits are analyzed
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r--pkg/portage/repository/commit.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/portage/repository/commit.go b/pkg/portage/repository/commit.go
index c0bda5b..17a3371 100644
--- a/pkg/portage/repository/commit.go
+++ b/pkg/portage/repository/commit.go
@@ -287,7 +287,7 @@ func dumpToDatabase() {
if err != nil {
slog.Error("Failed inserting Package", slog.Any("err", err))
}
- clear(packages)
+ packages = packages[:0]
}
if len(packagesCommit) > 0 {
@@ -295,7 +295,7 @@ func dumpToDatabase() {
if err != nil {
slog.Error("Failed inserting CommitToPackage", slog.Any("err", err))
}
- clear(packagesCommit)
+ packagesCommit = packagesCommit[:0]
}
if len(versionsCommits) > 0 {
@@ -303,7 +303,7 @@ func dumpToDatabase() {
if err != nil {
slog.Error("Failed inserting CommitToVersion", slog.Any("err", err))
}
- clear(versionsCommits)
+ versionsCommits = versionsCommits[:0]
}
if len(commits) > 0 {
@@ -311,6 +311,6 @@ func dumpToDatabase() {
if err != nil {
slog.Error("Failed inserting Commit", slog.Any("err", err))
}
- clear(commits)
+ commits = commits[:0]
}
}