mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-09-03 20:52:57 -05:00
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.
This commit is contained in:
+18
-1
@@ -62,7 +62,7 @@ account:\n""")
|
||||
|
||||
# Setup Flask-Security
|
||||
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
|
||||
security = Security(app, user_datastore)
|
||||
Security(app, user_datastore)
|
||||
|
||||
with app.app_context():
|
||||
password = encrypt_password(p1)
|
||||
@@ -230,6 +230,23 @@ CREATE TABLE IF NOT EXISTS debugger_function_arguments (
|
||||
use_default INTEGER NOT NULL CHECK (use_default >= 0 AND use_default <= 1) ,
|
||||
value TEXT,
|
||||
PRIMARY KEY (server_id, database_id, schema_id, function_id, arg_id)
|
||||
)""")
|
||||
|
||||
if int(version.value) < 10:
|
||||
db.engine.execute("""
|
||||
CREATE TABLE process(
|
||||
user_id INTEGER NOT NULL,
|
||||
pid TEXT NOT NULL,
|
||||
desc TEXT NOT NULL,
|
||||
command TEXT NOT NULL,
|
||||
arguments TEXT,
|
||||
start_time TEXT,
|
||||
end_time TEXT,
|
||||
logdir TEXT,
|
||||
exit_code INTEGER,
|
||||
acknowledge TEXT,
|
||||
PRIMARY KEY(pid),
|
||||
FOREIGN KEY(user_id) REFERENCES user (id)
|
||||
)""")
|
||||
|
||||
# Finally, update the schema version
|
||||
|
||||
Reference in New Issue
Block a user