Skip to content

Commit 963925e

Browse files
Fabian Hollerfho
authored andcommitted
add comments about memory-usage improvements
1 parent 2e4a261 commit 963925e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

main.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ func fetchAndRecord(clt *jenkins.Client, stateStore *store.Store, onlyRecordNewb
229229
continue
230230
}
231231

232+
// TODO: remove all jobs from the stateStore that Jenkins did
233+
// not return. These jobs must have been deleted, therefore
234+
// their state does not need to be kept in memory and on disk.
235+
232236
// We can not pass job here because it's in the format
233237
// <MultiBranchJobName>/<JobName>. The whitelist contains
234238
// either the MultiBranchJobName or the JobName
@@ -243,6 +247,13 @@ func fetchAndRecord(clt *jenkins.Client, stateStore *store.Store, onlyRecordNewb
243247

244248
highestID := builds[0].ID
245249

250+
// TODO: remove all builds from the UnrecordedBuildIDsIsEmpty
251+
// map that have a smaller ID then the lowest ID that jenkins
252+
// returned for the build.
253+
// This must mean that jenkins deleted the history of job with
254+
// those IDs and will never return information about them that
255+
// we can record.
256+
246257
storeBuild := stateStore.Get(job)
247258
if storeBuild == nil {
248259
if onlyRecordNewbuilds {

0 commit comments

Comments
 (0)