diff --git a/models/workflow_execution/workflow_scheduler.go b/models/workflow_execution/workflow_scheduler.go index 68b27cf..e4be90e 100644 --- a/models/workflow_execution/workflow_scheduler.go +++ b/models/workflow_execution/workflow_scheduler.go @@ -15,7 +15,6 @@ import ( "cloud.o-forge.io/core/oc-lib/tools" "github.com/google/uuid" "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 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++ { @@ -97,7 +96,7 @@ func (ws *WorkflowSchedule) CheckBooking(wfID string, request *tools.APIRequest) 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() c, err := getCallerCopy(request, errCh)