2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-08-19 15:08:55 +08:00

Remove base.DeadlinesKey

This commit is contained in:
Ken Hibino
2022-02-16 06:27:08 -08:00
parent 59927509d8
commit d4006894ad
6 changed files with 8 additions and 56 deletions

View File

@@ -137,11 +137,6 @@ func ArchivedKey(qname string) string {
return fmt.Sprintf("%sarchived", QueueKeyPrefix(qname))
}
// DeadlinesKey returns a redis key for the deadlines.
func DeadlinesKey(qname string) string {
return fmt.Sprintf("%sdeadlines", QueueKeyPrefix(qname))
}
// LeaseKey returns a redis key for the lease.
func LeaseKey(qname string) string {
return fmt.Sprintf("%slease", QueueKeyPrefix(qname))

View File

@@ -72,23 +72,6 @@ func TestActiveKey(t *testing.T) {
}
}
func TestDeadlinesKey(t *testing.T) {
tests := []struct {
qname string
want string
}{
{"default", "asynq:{default}:deadlines"},
{"custom", "asynq:{custom}:deadlines"},
}
for _, tc := range tests {
got := DeadlinesKey(tc.qname)
if got != tc.want {
t.Errorf("DeadlinesKey(%q) = %q, want %q", tc.qname, got, tc.want)
}
}
}
func TestLeaseKey(t *testing.T) {
tests := []struct {
qname string