Commit c9b45a08 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

astakos: rename full-cleanup command to cleanup-full

parent a3f6b22b
......@@ -43,11 +43,11 @@ class Command(NoArgsCommand):
def handle_noargs(self, **options):
self.stdout.write('Cleanup sessions ...\n')
call_command('cleanup')
self.stdout.write('Cleanup session catalog ...\n')
engine = import_module(settings.SESSION_ENGINE)
store = engine.SessionStore()
tbd = (entry for entry in SessionCatalog.objects.all() \
if not store.exists(entry.session_key))
for entry in tbd:
entry.delete()
\ No newline at end of file
entry.delete()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment