Skip to content

Commit

Permalink
Timer Cancellation Server Side changes. (cadence-workflow#11)
Browse files Browse the repository at this point in the history
* Thrift changes for cancel timer.

* Scripts to refer to local cassandra.

* Add CancelTimer to RespondDecisionTaskComplete

* Update integration test to run setup once.

* CR comments.
  • Loading branch information
sivakku authored Mar 1, 2017
1 parent a40c758 commit d9bfa1a
Show file tree
Hide file tree
Showing 12 changed files with 1,039 additions and 201 deletions.
143 changes: 66 additions & 77 deletions .gen/go/cadence/tchan-cadence.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,14 @@ func (c *tchanWorkflowServiceClient) GetWorkflowExecutionHistory(ctx thrift.Cont
}
success, err := c.client.Call(ctx, c.thriftService, "GetWorkflowExecutionHistory", &args, &resp)
if err == nil && !success {
switch {
case resp.BadRequestError != nil:
err = resp.BadRequestError
case resp.InternalServiceError != nil:
err = resp.InternalServiceError
case resp.EntityNotExistError != nil:
err = resp.EntityNotExistError
default:
err = fmt.Errorf("received no result or unknown exception for GetWorkflowExecutionHistory")
if e := resp.BadRequestError; e != nil {
err = e
}
if e := resp.InternalServiceError; e != nil {
err = e
}
if e := resp.EntityNotExistError; e != nil {
err = e
}
}

Expand All @@ -77,13 +76,11 @@ func (c *tchanWorkflowServiceClient) PollForActivityTask(ctx thrift.Context, pol
}
success, err := c.client.Call(ctx, c.thriftService, "PollForActivityTask", &args, &resp)
if err == nil && !success {
switch {
case resp.BadRequestError != nil:
err = resp.BadRequestError
case resp.InternalServiceError != nil:
err = resp.InternalServiceError
default:
err = fmt.Errorf("received no result or unknown exception for PollForActivityTask")
if e := resp.BadRequestError; e != nil {
err = e
}
if e := resp.InternalServiceError; e != nil {
err = e
}
}

Expand All @@ -97,13 +94,11 @@ func (c *tchanWorkflowServiceClient) PollForDecisionTask(ctx thrift.Context, pol
}
success, err := c.client.Call(ctx, c.thriftService, "PollForDecisionTask", &args, &resp)
if err == nil && !success {
switch {
case resp.BadRequestError != nil:
err = resp.BadRequestError
case resp.InternalServiceError != nil:
err = resp.InternalServiceError
default:
err = fmt.Errorf("received no result or unknown exception for PollForDecisionTask")
if e := resp.BadRequestError; e != nil {
err = e
}
if e := resp.InternalServiceError; e != nil {
err = e
}
}

Expand All @@ -117,15 +112,14 @@ func (c *tchanWorkflowServiceClient) RecordActivityTaskHeartbeat(ctx thrift.Cont
}
success, err := c.client.Call(ctx, c.thriftService, "RecordActivityTaskHeartbeat", &args, &resp)
if err == nil && !success {
switch {
case resp.BadRequestError != nil:
err = resp.BadRequestError
case resp.InternalServiceError != nil:
err = resp.InternalServiceError
case resp.EntityNotExistError != nil:
err = resp.EntityNotExistError
default:
err = fmt.Errorf("received no result or unknown exception for RecordActivityTaskHeartbeat")
if e := resp.BadRequestError; e != nil {
err = e
}
if e := resp.InternalServiceError; e != nil {
err = e
}
if e := resp.EntityNotExistError; e != nil {
err = e
}
}

Expand All @@ -139,15 +133,14 @@ func (c *tchanWorkflowServiceClient) RespondActivityTaskCanceled(ctx thrift.Cont
}
success, err := c.client.Call(ctx, c.thriftService, "RespondActivityTaskCanceled", &args, &resp)
if err == nil && !success {
switch {
case resp.BadRequestError != nil:
err = resp.BadRequestError
case resp.InternalServiceError != nil:
err = resp.InternalServiceError
case resp.EntityNotExistError != nil:
err = resp.EntityNotExistError
default:
err = fmt.Errorf("received no result or unknown exception for RespondActivityTaskCanceled")
if e := resp.BadRequestError; e != nil {
err = e
}
if e := resp.InternalServiceError; e != nil {
err = e
}
if e := resp.EntityNotExistError; e != nil {
err = e
}
}

Expand All @@ -161,15 +154,14 @@ func (c *tchanWorkflowServiceClient) RespondActivityTaskCompleted(ctx thrift.Con
}
success, err := c.client.Call(ctx, c.thriftService, "RespondActivityTaskCompleted", &args, &resp)
if err == nil && !success {
switch {
case resp.BadRequestError != nil:
err = resp.BadRequestError
case resp.InternalServiceError != nil:
err = resp.InternalServiceError
case resp.EntityNotExistError != nil:
err = resp.EntityNotExistError
default:
err = fmt.Errorf("received no result or unknown exception for RespondActivityTaskCompleted")
if e := resp.BadRequestError; e != nil {
err = e
}
if e := resp.InternalServiceError; e != nil {
err = e
}
if e := resp.EntityNotExistError; e != nil {
err = e
}
}

Expand All @@ -183,15 +175,14 @@ func (c *tchanWorkflowServiceClient) RespondActivityTaskFailed(ctx thrift.Contex
}
success, err := c.client.Call(ctx, c.thriftService, "RespondActivityTaskFailed", &args, &resp)
if err == nil && !success {
switch {
case resp.BadRequestError != nil:
err = resp.BadRequestError
case resp.InternalServiceError != nil:
err = resp.InternalServiceError
case resp.EntityNotExistError != nil:
err = resp.EntityNotExistError
default:
err = fmt.Errorf("received no result or unknown exception for RespondActivityTaskFailed")
if e := resp.BadRequestError; e != nil {
err = e
}
if e := resp.InternalServiceError; e != nil {
err = e
}
if e := resp.EntityNotExistError; e != nil {
err = e
}
}

Expand All @@ -205,15 +196,14 @@ func (c *tchanWorkflowServiceClient) RespondDecisionTaskCompleted(ctx thrift.Con
}
success, err := c.client.Call(ctx, c.thriftService, "RespondDecisionTaskCompleted", &args, &resp)
if err == nil && !success {
switch {
case resp.BadRequestError != nil:
err = resp.BadRequestError
case resp.InternalServiceError != nil:
err = resp.InternalServiceError
case resp.EntityNotExistError != nil:
err = resp.EntityNotExistError
default:
err = fmt.Errorf("received no result or unknown exception for RespondDecisionTaskCompleted")
if e := resp.BadRequestError; e != nil {
err = e
}
if e := resp.InternalServiceError; e != nil {
err = e
}
if e := resp.EntityNotExistError; e != nil {
err = e
}
}

Expand All @@ -227,15 +217,14 @@ func (c *tchanWorkflowServiceClient) StartWorkflowExecution(ctx thrift.Context,
}
success, err := c.client.Call(ctx, c.thriftService, "StartWorkflowExecution", &args, &resp)
if err == nil && !success {
switch {
case resp.BadRequestError != nil:
err = resp.BadRequestError
case resp.InternalServiceError != nil:
err = resp.InternalServiceError
case resp.SessionAlreadyExistError != nil:
err = resp.SessionAlreadyExistError
default:
err = fmt.Errorf("received no result or unknown exception for StartWorkflowExecution")
if e := resp.BadRequestError; e != nil {
err = e
}
if e := resp.InternalServiceError; e != nil {
err = e
}
if e := resp.SessionAlreadyExistError; e != nil {
err = e
}
}

Expand Down
Loading

0 comments on commit d9bfa1a

Please sign in to comment.