pgadmin4/web/pgadmin/misc/sql/__init__.py
Ashesh Vashi f682f06c94 Adding a background process executor, and observer.
We will be using the external utilities like pg_dump, pg_dumpall,
pg_restore in background. pgAdmin 4 can be run as a CGI script, hence -
it is not good idea to run those utility in a controlled environment.
The process executor will run them in background, and we will execute
the process executor in detached mode.

Now that - the process executor runs in detached mode, we need an
observer, which will look at the status of the processes. It also reads
output, and error logs on demand.

Thanks - Surinder for helping in some of the UI changes.
2016-05-13 08:49:51 +05:30

28 lines
798 B
Python

##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2016, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
"""A blueprint module providing utility functions for the application."""
from flask import url_for
from pgadmin.utils import PgAdminModule
MODULE_NAME = 'sql'
class SQLModule(PgAdminModule):
def get_own_javascripts(self):
return [{
'name': 'pgadmin.browser.object_sql',
'path': url_for('sql.static', filename='js/sql'),
'when': None
}]
# Initialise the module
blueprint = SQLModule(MODULE_NAME, __name__, url_prefix='/misc/sql')