@@ -100,7 +100,7 @@ func (op *ShellOperator) Start() {
100100 // Create 'main' queue and add onStartup tasks and enable bindings tasks.
101101 op .bootstrapMainQueue (op .TaskQueues )
102102 // Start main task queue handler
103- op .TaskQueues .StartMain ()
103+ op .TaskQueues .StartMain (op . ctx )
104104 op .initAndStartHookQueues ()
105105
106106 // Start emit "live" metrics
@@ -255,7 +255,7 @@ func (op *ShellOperator) initValidatingWebhookManager() error {
255255 return nil , fmt .Errorf ("no hook found for '%s' '%s'" , event .ConfigurationId , event .WebhookId )
256256 }
257257
258- res := op .taskHandler (admissionTask )
258+ res := op .taskHandler (op . ctx , admissionTask )
259259
260260 if res .Status == "Fail" {
261261 return & admission.Response {
@@ -361,7 +361,7 @@ func (op *ShellOperator) conversionEventHandler(crdName string, request *v1.Conv
361361 return nil , fmt .Errorf ("no hook found for '%s' event for crd/%s" , string (types .KubernetesConversion ), crdName )
362362 }
363363
364- res := op .taskHandler (convTask )
364+ res := op .taskHandler (op . ctx , convTask )
365365
366366 if res .Status == "Fail" {
367367 return & conversion.Response {
@@ -409,7 +409,7 @@ func (op *ShellOperator) conversionEventHandler(crdName string, request *v1.Conv
409409}
410410
411411// taskHandler
412- func (op * ShellOperator ) taskHandler (t task.Task ) queue.TaskResult {
412+ func (op * ShellOperator ) taskHandler (_ context. Context , t task.Task ) queue.TaskResult {
413413 logEntry := op .logger .With ("operator.component" , "taskRunner" )
414414 hookMeta := task_metadata .HookMetadataAccessor (t )
415415 var res queue.TaskResult
@@ -882,7 +882,7 @@ func (op *ShellOperator) initAndStartHookQueues() {
882882 for _ , hookBinding := range h .Config .Schedules {
883883 if op .TaskQueues .GetByName (hookBinding .Queue ) == nil {
884884 op .TaskQueues .NewNamedQueue (hookBinding .Queue , op .taskHandler )
885- op .TaskQueues .GetByName (hookBinding .Queue ).Start ()
885+ op .TaskQueues .GetByName (hookBinding .Queue ).Start (op . ctx )
886886 }
887887 }
888888 }
@@ -893,7 +893,7 @@ func (op *ShellOperator) initAndStartHookQueues() {
893893 for _ , hookBinding := range h .Config .OnKubernetesEvents {
894894 if op .TaskQueues .GetByName (hookBinding .Queue ) == nil {
895895 op .TaskQueues .NewNamedQueue (hookBinding .Queue , op .taskHandler )
896- op .TaskQueues .GetByName (hookBinding .Queue ).Start ()
896+ op .TaskQueues .GetByName (hookBinding .Queue ).Start (op . ctx )
897897 }
898898 }
899899 }
0 commit comments