Skip to content

Commit

Permalink
Match history and proto task category definition (#2586)
Browse files Browse the repository at this point in the history
  • Loading branch information
yycptt authored Mar 8, 2022
1 parent 11c67aa commit 72fb979
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions service/history/tasks/category.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import (
"fmt"
"strconv"
"sync"

enumsspb "go.temporal.io/server/api/enums/v1"
)

type (
Expand All @@ -41,11 +43,11 @@ type (
)

const (
CategoryIDUnspecified int32 = iota
CategoryIDTransfer
CategoryIDTimer
CategoryIDVisibility
CategoryIDReplication
CategoryIDUnspecified = int32(enumsspb.TASK_CATEGORY_UNSPECIFIED)
CategoryIDTransfer = int32(enumsspb.TASK_CATEGORY_TRANSFER)
CategoryIDTimer = int32(enumsspb.TASK_CATEGORY_TIMER)
CategoryIDReplication = int32(enumsspb.TASK_CATEGORY_REPLICATION)
CategoryIDVisibility = int32(enumsspb.TASK_CATEGORY_VISIBILITY)
)

const (
Expand All @@ -57,8 +59,8 @@ const (
const (
CategoryNameTransfer = "transfer"
CategoryNameTimer = "timer"
CategoryNameVisibility = "visibility"
CategoryNameReplication = "replication"
CategoryNameVisibility = "visibility"
)

var (
Expand All @@ -74,17 +76,17 @@ var (
name: CategoryNameTimer,
}

CategoryVisibility = Category{
id: CategoryIDVisibility,
cType: CategoryTypeImmediate,
name: CategoryNameVisibility,
}

CategoryReplication = Category{
id: CategoryIDReplication,
cType: CategoryTypeImmediate,
name: CategoryNameReplication,
}

CategoryVisibility = Category{
id: CategoryIDVisibility,
cType: CategoryTypeImmediate,
name: CategoryNameVisibility,
}
)

var (
Expand Down

0 comments on commit 72fb979

Please sign in to comment.