corrected the getBooking function parameters
This commit is contained in:
parent
da0de80afd
commit
690d60f9d6
@ -15,7 +15,6 @@ import (
|
|||||||
"cloud.o-forge.io/core/oc-lib/tools"
|
"cloud.o-forge.io/core/oc-lib/tools"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/robfig/cron"
|
"github.com/robfig/cron"
|
||||||
"github.com/rs/zerolog"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -85,7 +84,7 @@ func (ws *WorkflowSchedule) CheckBooking(wfID string, request *tools.APIRequest)
|
|||||||
var m sync.Mutex
|
var m sync.Mutex
|
||||||
|
|
||||||
for _, b := range bookings {
|
for _, b := range bookings {
|
||||||
go getBooking(l, b, request, wf, execs, bookings, errCh, &m)
|
go getBooking(b, request, wf, execs, bookings, errCh, &m)
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < len(bookings); i++ {
|
for i := 0; i < len(bookings); i++ {
|
||||||
@ -97,7 +96,7 @@ func (ws *WorkflowSchedule) CheckBooking(wfID string, request *tools.APIRequest)
|
|||||||
return true, wf, execs, bookings, nil
|
return true, wf, execs, bookings, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func getBooking(l zerolog.Logger, b *booking.Booking, request *tools.APIRequest, wf *workflow.Workflow, execs []*WorkflowExecution, bookings []*booking.Booking, errCh chan error, m *sync.Mutex) {
|
func getBooking( b *booking.Booking, request *tools.APIRequest, wf *workflow.Workflow, execs []*WorkflowExecution, bookings []*booking.Booking, errCh chan error, m *sync.Mutex) {
|
||||||
|
|
||||||
m.Lock()
|
m.Lock()
|
||||||
c, err := getCallerCopy(request, errCh)
|
c, err := getCallerCopy(request, errCh)
|
||||||
|
Loading…
Reference in New Issue
Block a user