File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 4242from pgadmin import create_app
4343from pgadmin .utils import clear_database_servers , dump_database_servers , \
4444 load_database_servers , _handle_error
45+ from pgadmin .utils .session import cleanup_session_files
4546from pgadmin .setup import db_upgrade , create_app_data_directory
4647from typing import Optional , List
4748from typing_extensions import Annotated
@@ -636,6 +637,16 @@ def run_migration_for_others():
636637 run_migration_for_sqlite ()
637638
638639
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+
639650def main ():
640651 app ()
641652
You can’t perform that action at this time.
0 commit comments