File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def info(self):
96
96
}
97
97
98
98
def keys (self ):
99
- raise NotImplementedError
99
+ return [ key . replace ( 'resque:' , '' ) for key in self . redis . keys ( '*' )]
100
100
101
101
def reserve (self , queue ):
102
102
from pyres .job import Job
Original file line number Diff line number Diff line change @@ -126,6 +126,13 @@ def test_remove_queue(self):
126
126
assert 'basic' not in self .resq ._watched_queues
127
127
assert not self .redis .sismember ('queues' ,'basic' )
128
128
assert not self .redis .exists ('queue:basic' )
129
+
130
+ def test_keys (self ):
131
+ self .resq .enqueue_from_string ('tests.Basic' ,'basic' ,'test1' )
132
+ print self .resq .keys ()
133
+ assert 'queue:basic' in self .resq .keys ()
134
+ assert 'queues' in self .resq .keys ()
135
+
129
136
130
137
class JobTests (PyResTests ):
131
138
def test_reserve (self ):
You can’t perform that action at this time.
0 commit comments