mirror of
https://github.com/hibiken/asynq.git
synced 2025-08-19 15:08:55 +08:00
Replace github.com/rs/xid with github.com/google/uuid
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis/v7"
|
||||
"github.com/rs/xid"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// Version of asynq library and CLI.
|
||||
@@ -78,7 +78,7 @@ type TaskMessage struct {
|
||||
Payload map[string]interface{}
|
||||
|
||||
// ID is a unique identifier for each task.
|
||||
ID xid.ID
|
||||
ID uuid.UUID
|
||||
|
||||
// Queue is a name this message should be enqueued to.
|
||||
Queue string
|
||||
|
@@ -12,7 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/rs/xid"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func TestQueueKey(t *testing.T) {
|
||||
@@ -108,7 +108,7 @@ func TestWorkersKey(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMessageEncoding(t *testing.T) {
|
||||
id := xid.New()
|
||||
id := uuid.New()
|
||||
tests := []struct {
|
||||
in *TaskMessage
|
||||
out *TaskMessage
|
||||
|
Reference in New Issue
Block a user