Skip to content
This repository has been archived by the owner on May 8, 2023. It is now read-only.

Commit

Permalink
plugin: fix context
Browse files Browse the repository at this point in the history
  • Loading branch information
zbindenren committed May 4, 2020
1 parent b5ff8a5 commit 37bdf5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,11 @@ func (o *SyncOptions) Run() error {
return nil
}

ctx, cancel = context.WithTimeout(context.Background(), o.userSpecifiedTimeout)
defer cancel()

watch, err := batchClient.Watch(
context.TODO(),
ctx,
metav1.ListOptions{
LabelSelector: fmt.Sprintf("job=%s,jobSuffix=%s", job.Name, suffix),
},
Expand Down

0 comments on commit 37bdf5d

Please sign in to comment.