summaryrefslogtreecommitdiff
path: root/common/jobs/interface.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/jobs/interface.go')
-rw-r--r--common/jobs/interface.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/common/jobs/interface.go b/common/jobs/interface.go
index f90c9c21..c957df2b 100644
--- a/common/jobs/interface.go
+++ b/common/jobs/interface.go
@@ -1,6 +1,8 @@
package jobs
import (
+ "context"
+
"github.com/spiral/roadrunner/v2/pkg/events"
priorityqueue "github.com/spiral/roadrunner/v2/pkg/priority_queue"
"github.com/spiral/roadrunner/v2/plugins/jobs/job"
@@ -9,13 +11,13 @@ import (
// Consumer todo naming
type Consumer interface {
- Push(job *job.Job) error
- Register(pipeline *pipeline.Pipeline) error
- Run(pipeline *pipeline.Pipeline) error
- Stop() error
+ Push(ctx context.Context, job *job.Job) error
+ Register(ctx context.Context, pipeline *pipeline.Pipeline) error
+ Run(ctx context.Context, pipeline *pipeline.Pipeline) error
+ Stop(ctx context.Context) error
- Pause(pipeline string)
- Resume(pipeline string)
+ Pause(ctx context.Context, pipeline string)
+ Resume(ctx context.Context, pipeline string)
}
type Constructor interface {