File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ def backend(redis_url):
2727 try :
2828 yield backend
2929 finally :
30- clear_locks ( backend )
30+ backend . redis . flushall ( )
3131 backends ._backend = None
3232
3333
Original file line number Diff line number Diff line change 88from celery_singleton .singleton import Singleton , clear_locks
99from celery_singleton import util , DuplicateTaskError
1010from celery_singleton .backends .redis import RedisBackend
11+ from celery_singleton .backends import get_backend
12+ from celery_singleton .config import Config
1113
1214
1315@pytest .fixture (scope = "session" )
@@ -30,7 +32,8 @@ def scoped_app(celery_app):
3032 try :
3133 yield celery_app
3234 finally :
33- clear_locks (celery_app )
35+ backend = get_backend (Config (celery_app ))
36+ backend .redis .flushall ()
3437
3538
3639class ExpectedTaskFail (Exception ):
You can’t perform that action at this time.
0 commit comments