mirror of
https://github.com/hibiken/asynq.git
synced 2025-08-19 15:08:55 +08:00
Add DeleteQueue method to Inspector
- Added ErrQueueNotFound and ErrQueueNotEmpty type to indicate the kind of an error returned from the method.
This commit is contained in:
@@ -745,7 +745,6 @@ func (r *RDB) RemoveQueue(qname string, force bool) error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return r.client.SRem(base.AllQueues, qname).Err()
|
||||
}
|
||||
|
||||
|
@@ -2707,10 +2707,10 @@ func TestRemoveQueue(t *testing.T) {
|
||||
|
||||
err := r.RemoveQueue(tc.qname, tc.force)
|
||||
if err != nil {
|
||||
t.Errorf("(*RDB).RemoveQueue(%q) = %v, want nil", tc.qname, err)
|
||||
t.Errorf("(*RDB).RemoveQueue(%q, %t) = %v, want nil",
|
||||
tc.qname, tc.force, err)
|
||||
continue
|
||||
}
|
||||
|
||||
if r.client.SIsMember(base.AllQueues, tc.qname).Val() {
|
||||
t.Errorf("%q is a member of %q", tc.qname, base.AllQueues)
|
||||
}
|
||||
|
Reference in New Issue
Block a user