This commit is contained in:
fiftin 2024-02-10 18:59:56 +05:00
parent b52f2ef348
commit e2f43bee7e

View File

@ -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)