mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
fix(schedule): parallel tasks with boltdb (https://github.com/ansible-semaphore/semaphore/issues/1211)
This commit is contained in:
parent
b52f2ef348
commit
e2f43bee7e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user