Skip to content

Commit

Permalink
[Keystone] Disable remote calls to RegisterToWorkflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bolekk committed Nov 21, 2024
1 parent 9eceab5 commit 741adc1
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions core/capabilities/remote/executable/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,40 +140,10 @@ func (c *client) Info(ctx context.Context) (commoncap.CapabilityInfo, error) {
}

func (c *client) RegisterToWorkflow(ctx context.Context, registerRequest commoncap.RegisterToWorkflowRequest) error {
req, err := request.NewClientRegisterToWorkflowRequest(ctx, c.lggr, registerRequest, c.remoteCapabilityInfo, c.localDONInfo, c.dispatcher,
c.requestTimeout)

if err != nil {
return fmt.Errorf("failed to create client request: %w", err)
}

if err = c.sendRequest(req); err != nil {
return fmt.Errorf("failed to send request: %w", err)
}

resp := <-req.ResponseChan()
if resp.Err != nil {
return fmt.Errorf("error executing request: %w", resp.Err)
}
return nil
}

func (c *client) UnregisterFromWorkflow(ctx context.Context, unregisterRequest commoncap.UnregisterFromWorkflowRequest) error {
req, err := request.NewClientUnregisterFromWorkflowRequest(ctx, c.lggr, unregisterRequest, c.remoteCapabilityInfo,
c.localDONInfo, c.dispatcher, c.requestTimeout)

if err != nil {
return fmt.Errorf("failed to create client request: %w", err)
}

if err = c.sendRequest(req); err != nil {
return fmt.Errorf("failed to send request: %w", err)
}

resp := <-req.ResponseChan()
if resp.Err != nil {
return fmt.Errorf("error executing request: %w", resp.Err)
}
return nil
}

Expand Down

0 comments on commit 741adc1

Please sign in to comment.