diff --git a/services/schedules/SchedulePool.go b/services/schedules/SchedulePool.go index b6cefaca..9e80fd4f 100644 --- a/services/schedules/SchedulePool.go +++ b/services/schedules/SchedulePool.go @@ -1,6 +1,7 @@ package schedules import ( + "strconv" "sync" log "github.com/Sirupsen/logrus" @@ -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)