mirror of
				https://github.com/hibiken/asynq.git
				synced 2025-10-25 23:06:12 +08:00 
			
		
		
		
	Minor fixes
This commit is contained in:
		| @@ -7,7 +7,6 @@ package base | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"context" | 	"context" | ||||||
| 	"errors" |  | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"sync" | 	"sync" | ||||||
| 	"time" | 	"time" | ||||||
| @@ -590,10 +589,3 @@ type Broker interface { | |||||||
| 	PublishCancelation(id string) error | 	PublishCancelation(id string) error | ||||||
| 	Close() error | 	Close() error | ||||||
| } | } | ||||||
|  |  | ||||||
| // List of canonical errors. |  | ||||||
| var ( |  | ||||||
| 	ErrNotFound           = errors.New("not found") |  | ||||||
| 	ErrFailedPrecondition = errors.New("failed precondition") |  | ||||||
| 	ErrInternal           = errors.New("internal error") |  | ||||||
| ) |  | ||||||
|   | |||||||
| @@ -95,9 +95,9 @@ if not ok then | |||||||
| end | end | ||||||
| redis.call("HSET", KEYS[2], | redis.call("HSET", KEYS[2], | ||||||
|            "msg", ARGV[3], |            "msg", ARGV[3], | ||||||
| 		   "state", "pending", |            "state", "pending", | ||||||
|            "timeout", ARGV[4], |            "timeout", ARGV[4], | ||||||
| 		   "deadline", ARGV[5]) |            "deadline", ARGV[5]) | ||||||
| redis.call("LPUSH", KEYS[3], ARGV[1]) | redis.call("LPUSH", KEYS[3], ARGV[1]) | ||||||
| return 1 | return 1 | ||||||
| `) | `) | ||||||
|   | |||||||
| @@ -112,7 +112,7 @@ func TestEnqueue(t *testing.T) { | |||||||
| 		} | 		} | ||||||
| 		deadline := r.client.HGet(taskKey, "deadline").Val() // "deadline" field | 		deadline := r.client.HGet(taskKey, "deadline").Val() // "deadline" field | ||||||
| 		if want := strconv.Itoa(int(tc.msg.Deadline)); deadline != want { | 		if want := strconv.Itoa(int(tc.msg.Deadline)); deadline != want { | ||||||
| 			t.Errorf("deadline field under task-ke is set to %v, want %v", deadline, want) | 			t.Errorf("deadline field under task-key is set to %v, want %v", deadline, want) | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		// Check queue is in the AllQueues set. | 		// Check queue is in the AllQueues set. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user