Update RDB Enqueue and Schedule methods to check for task ID conflict

This commit is contained in:
Ken Hibino
2021-09-10 16:47:00 -07:00
parent ee402a5c59
commit 6dc692afa4
3 changed files with 220 additions and 15 deletions

View File

@@ -170,6 +170,9 @@ var (
// ErrDuplicateTask indicates that another task with the same unique key holds the uniqueness lock.
ErrDuplicateTask = errors.New("task already exists")
// ErrTaskIdConflict indicates that another task with the same task ID already exist
ErrTaskIdConflict = errors.New("task id conflicts with another task")
)
// TaskNotFoundError indicates that a task with the given ID does not exist