Skip to content

Commit

Permalink
Convert task store/manager to use internal types (#3663)
Browse files Browse the repository at this point in the history
  • Loading branch information
anish531213 authored Oct 16, 2020
1 parent aa81104 commit 39dfa44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions common/persistence/cassandra/cassandraTaskPersistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ func (d *cassandraTaskPersistence) CreateTasks(
rowTypeTask,
task.TaskID,
domainID,
task.Execution.GetWorkflowId(),
task.Execution.GetRunId(),
task.Execution.GetWorkflowID(),
task.Execution.GetRunID(),
scheduleID,
cqlNowTimestamp)
} else {
Expand All @@ -431,8 +431,8 @@ func (d *cassandraTaskPersistence) CreateTasks(
rowTypeTask,
task.TaskID,
domainID,
task.Execution.GetWorkflowId(),
task.Execution.GetRunId(),
task.Execution.GetWorkflowID(),
task.Execution.GetRunID(),
scheduleID,
cqlNowTimestamp,
ttl)
Expand Down
2 changes: 1 addition & 1 deletion common/persistence/persistenceInterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ type (

// InternalCreateTasksInfo describes a task to be created in InternalCreateTasksRequest
InternalCreateTasksInfo struct {
Execution workflow.WorkflowExecution
Execution types.WorkflowExecution
Data *InternalTaskInfo
TaskID int64
}
Expand Down
4 changes: 3 additions & 1 deletion common/persistence/taskManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ package persistence

import (
"context"

"github.com/uber/cadence/common/types/mapper/thrift"
)

type (
Expand Down Expand Up @@ -108,7 +110,7 @@ func (t *taskManager) toInternalCreateTaskInfo(createTaskInfo *CreateTaskInfo) *
return nil
}
return &InternalCreateTasksInfo{
Execution: createTaskInfo.Execution,
Execution: *thrift.ToWorkflowExecution(&createTaskInfo.Execution),
Data: t.toInternalTaskInfo(createTaskInfo.Data),
TaskID: createTaskInfo.TaskID,
}
Expand Down

0 comments on commit 39dfa44

Please sign in to comment.