Skip to content

Commit

Permalink
Remove double benchmark optimization
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Poinsard <[email protected]>
  • Loading branch information
frouioui committed Jun 11, 2024
1 parent 840add5 commit 3fb3ef1
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions go/server/cron_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,10 @@ func (s *Server) branchCronHandler() {

execElements := append(mainBranchElements, releaseBranchElements...)
for _, elem := range execElements {
s.removeBranchElementFromQueue(elem)
s.addToQueue(elem)
}
}

func (s *Server) removeBranchElementFromQueue(newElem *executionQueueElement) {
mtx.Lock()
defer mtx.Unlock()

for identifier, element := range queue {
if element.Executing {
continue
}
if identifier.PlannerVersion == newElem.identifier.PlannerVersion && identifier.BenchmarkType == newElem.identifier.BenchmarkType && identifier.Source == newElem.identifier.Source && identifier.GitRef != newElem.identifier.GitRef {
slog.Infof("%+v is removed from the queue", identifier)
delete(queue, identifier)
}
}
}

func (s *Server) mainBranchCronHandler() ([]*executionQueueElement, error) {
var elements []*executionQueueElement
configs := s.getConfigFiles()
Expand Down

0 comments on commit 3fb3ef1

Please sign in to comment.