feat: workflow run dispatcher
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
type workflowService interface {
|
||||
StartRun(ctx context.Context, req *dtos.WorkflowStartRunReq) error
|
||||
CancelRun(ctx context.Context, req *dtos.WorkflowCancelRunReq) error
|
||||
Stop(ctx context.Context)
|
||||
Shutdown(ctx context.Context)
|
||||
}
|
||||
|
||||
type WorkflowHandler struct {
|
||||
|
||||
@@ -46,6 +46,6 @@ func Register(router *router.Router[*core.RequestEvent]) {
|
||||
|
||||
func Unregister() {
|
||||
if workflowSvc != nil {
|
||||
workflowSvc.Stop(context.Background())
|
||||
workflowSvc.Shutdown(context.Background())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user