Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng committed Dec 9, 2024
1 parent 99424a5 commit 5e066b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions service/api/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -864,13 +864,13 @@ func (s *serviceImpl) ApiV1WorkflowSkipTimerPost(
func (s *serviceImpl) ApiV1WorkflowDumpPost(
ctx context.Context, request iwfidl.WorkflowDumpRequest,
) (*iwfidl.WorkflowDumpResponse, *errors.ErrorAndStatus) {
var pageOfSnapshot *iwfidl.WorkflowDumpResponse
var pageOfSnapshot iwfidl.WorkflowDumpResponse

err := s.client.QueryWorkflow(ctx, &pageOfSnapshot, request.GetWorkflowId(), request.GetWorkflowRunId(), service.ContinueAsNewDumpQueryType, request)
err := s.client.QueryWorkflow(ctx, &pageOfSnapshot, request.GetWorkflowId(), request.GetWorkflowRunId(), service.ContinueAsNewDumpByPageQueryType, request)
if err != nil {
return nil, s.handleError(err, WorkflowInternalDumpApiPath, request.GetWorkflowId())
}
return pageOfSnapshot, nil
return &pageOfSnapshot, nil
}

func (s *serviceImpl) ApiInfoHealth(ctx context.Context) *iwfidl.HealthInfo {
Expand Down
2 changes: 1 addition & 1 deletion service/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const (
GetDataAttributesWorkflowQueryType = "GetDataAttributes"
GetSearchAttributesWorkflowQueryType = "GetSearchAttributes"
GetCurrentTimerInfosQueryType = "GetCurrentTimerInfos"
ContinueAsNewDumpQueryType = "ContinueAsNewDump"
ContinueAsNewDumpByPageQueryType = "ContinueAsNewDumpByPage"
DebugDumpQueryType = "DebugNewDump"
PrepareRpcQueryType = "PrepareRpcQueryType"

Expand Down
3 changes: 2 additions & 1 deletion service/interpreter/continueAsNewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ func (c *ContinueAsNewer) GetSnapshot() service.ContinueAsNewDumpResponse {
}

func (c *ContinueAsNewer) SetQueryHandlersForContinueAsNew(ctx UnifiedContext) error {
return c.provider.SetQueryHandler(ctx, service.ContinueAsNewDumpQueryType,
return c.provider.SetQueryHandler(ctx, service.ContinueAsNewDumpByPageQueryType,
// return the current page of the whole snapshot
func(request iwfidl.WorkflowDumpRequest) (*iwfidl.WorkflowDumpResponse, error) {
wholeSnapshot := c.GetSnapshot()
wholeData, err := json.Marshal(wholeSnapshot)
Expand Down

0 comments on commit 5e066b5

Please sign in to comment.