Replace google/uuid package with rs/xid for more compact id

This commit is contained in:
Ken Hibino
2019-12-11 07:38:24 -08:00
parent 8b6e3172ce
commit edcd70b221
11 changed files with 53 additions and 43 deletions

View File

@@ -3,7 +3,7 @@ package asynq
import (
"time"
"github.com/google/uuid"
"github.com/rs/xid"
"github.com/hibiken/asynq/internal/rdb"
)
@@ -29,7 +29,7 @@ func NewClient(cfg *RedisConfig) *Client {
// otherwise returns non-nil error.
func (c *Client) Process(task *Task, processAt time.Time) error {
msg := &rdb.TaskMessage{
ID: uuid.New(),
ID: xid.New(),
Type: task.Type,
Payload: task.Payload,
Queue: "default",