Skip to content

Commit

Permalink
fix: task id not update
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Aug 31, 2022
1 parent 755f4b8 commit 454f563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/task/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ type Manager[K comparable] struct {

func (tm *Manager[K]) Submit(task *Task[K]) K {
if tm.updateID != nil {
tm.updateID(&tm.curID)
task.ID = tm.curID
tm.updateID(&task.ID)
}
tm.tasks.Store(task.ID, task)
tm.do(task)
Expand Down

0 comments on commit 454f563

Please sign in to comment.