Skip to content

Commit

Permalink
fix(schedule): parallel tasks with boltdb (#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Feb 10, 2024
1 parent b52f2ef commit e2f43be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/schedules/SchedulePool.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package schedules

import (
"strconv"
"sync"

log "github.com/Sirupsen/logrus"
Expand Down Expand Up @@ -53,8 +54,8 @@ func (r ScheduleRunner) tryUpdateScheduleCommitHash(schedule db.Schedule) (updat

func (r ScheduleRunner) Run() {
if !r.pool.store.PermanentConnection() {
r.pool.store.Connect("schedule")
defer r.pool.store.Close("schedule")
r.pool.store.Connect("schedule " + strconv.Itoa(r.scheduleID))
defer r.pool.store.Close("schedule " + strconv.Itoa(r.scheduleID))
}

schedule, err := r.pool.store.GetSchedule(r.projectID, r.scheduleID)
Expand Down

0 comments on commit e2f43be

Please sign in to comment.