Skip to content

Commit

Permalink
fix(worker): deprecate On in favor of RegisterWorkflow (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen authored Jun 25, 2024
1 parent 1490d88 commit 5ffa3d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/worker/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func (s *Service) RegisterWorkflow(workflow workflowConverter) error {
return s.On(workflow.ToWorkflowTrigger(), workflow)
}

// Deprecated: Use RegisterWorkflow instead
func (s *Service) On(t triggerConverter, workflow workflowConverter) error {
namespace := s.worker.client.Namespace()

Expand Down
1 change: 1 addition & 0 deletions pkg/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func (w *Worker) RegisterWorkflow(workflow workflowConverter) error {
return w.On(workflow.ToWorkflowTrigger(), workflow)
}

// Deprecated: Use RegisterWorkflow instead
func (w *Worker) On(t triggerConverter, workflow workflowConverter) error {
// get the default service
svc, ok := w.services.Load("default")
Expand Down

0 comments on commit 5ffa3d1

Please sign in to comment.