Change TaskInfo to use public fields instead of methods

This commit is contained in:
Ken Hibino
2021-06-14 07:31:39 -07:00
parent e01c6379c8
commit a9feec5967
6 changed files with 322 additions and 303 deletions

View File

@@ -320,7 +320,7 @@ func (c *Client) Enqueue(task *Task, opts ...Option) (*TaskInfo, error) {
case err != nil:
return nil, err
}
return &TaskInfo{msg, state, opt.processAt}, nil
return newTaskInfo(msg, state, opt.processAt), nil
}
func (c *Client) enqueue(msg *base.TaskMessage, uniqueTTL time.Duration) error {