Skip to content

Commit

Permalink
Refactoring Cassandra task persistence manager for NoSQL support
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng authored Jun 2, 2021
1 parent b660112 commit 723ecf5
Show file tree
Hide file tree
Showing 11 changed files with 905 additions and 427 deletions.
2 changes: 1 addition & 1 deletion common/persistence/cassandra/cassandraPersistence.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const (
rowTypeShardTaskID = int64(-11)
emptyInitiatedID = int64(-7)

stickyTaskListTTL = int32(24 * time.Hour / time.Second) // if sticky task_list stopped being updated, remove it in one day
stickyTaskListTTL = int64(24 * time.Hour / time.Second) // if sticky task_list stopped being updated, remove it in one day
)

const (
Expand Down
23 changes: 0 additions & 23 deletions common/persistence/cassandra/cassandraPersistenceUtil.go
Original file line number Diff line number Diff line change
Expand Up @@ -2131,29 +2131,6 @@ func createHistoryEventBatchBlob(
return eventBatch
}

func createTaskInfo(
result map[string]interface{},
) *p.InternalTaskInfo {

info := &p.InternalTaskInfo{}
for k, v := range result {
switch k {
case "domain_id":
info.DomainID = v.(gocql.UUID).String()
case "workflow_id":
info.WorkflowID = v.(string)
case "run_id":
info.RunID = v.(gocql.UUID).String()
case "schedule_id":
info.ScheduleID = v.(int64)
case "created_time":
info.CreatedTime = v.(time.Time)
}
}

return info
}

func createTimerTaskInfo(
result map[string]interface{},
) *p.TimerTaskInfo {
Expand Down
Loading

0 comments on commit 723ecf5

Please sign in to comment.