We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9af745 commit e966f64Copy full SHA for e966f64
1 file changed
web/setup.py
@@ -42,6 +42,7 @@
42
from pgadmin import create_app
43
from pgadmin.utils import clear_database_servers, dump_database_servers, \
44
load_database_servers, _handle_error
45
+from pgadmin.utils.session import cleanup_session_files
46
from pgadmin.setup import db_upgrade, create_app_data_directory
47
from typing import Optional, List
48
from typing_extensions import Annotated
@@ -636,6 +637,16 @@ def run_migration_for_others():
636
637
run_migration_for_sqlite()
638
639
640
+class ManageSessions:
641
+
642
+ @app.command()
643
+ def cleanup_session_files():
644
+ """Delete expired session files."""
645
+ app = create_app(config.APP_NAME + '-cli')
646
+ with app.app_context():
647
+ cleanup_session_files()
648
649
650
def main():
651
app()
652
0 commit comments