Skip to content

Commit c701de3

Browse files
committed
Use Activity interface for registering activities
1 parent e6703ff commit c701de3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

worker/worker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func New(backend backend.Backend, options *Options) *Worker {
6767
// Start starts the worker.
6868
//
6969
// To stop the worker, cancel the context passed to Start. To wait for completion of the active
70-
// work items, call `WaitForCompletion`.
70+
// tasks, call `WaitForCompletion`.
7171
func (w *Worker) Start(ctx context.Context) error {
7272
if err := w.workflowWorker.Start(ctx); err != nil {
7373
return fmt.Errorf("starting workflow worker: %w", err)
@@ -96,6 +96,6 @@ func (w *Worker) RegisterWorkflow(wf workflow.Workflow) error {
9696
return w.registry.RegisterWorkflow(wf)
9797
}
9898

99-
func (w *Worker) RegisterActivity(a interface{}) error {
99+
func (w *Worker) RegisterActivity(a workflow.Activity) error {
100100
return w.registry.RegisterActivity(a)
101101
}

0 commit comments

Comments
 (0)