mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06: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:
@@ -168,3 +168,22 @@ class DebuggerFunctionArguments(db.Model):
|
||||
nullable=False)
|
||||
|
||||
value = db.Column(db.String(), nullable=True)
|
||||
|
||||
|
||||
class Process(db.Model):
|
||||
"""Define the Process table."""
|
||||
__tablename__ = 'process'
|
||||
pid = db.Column(db.String(), nullable=False, primary_key=True)
|
||||
user_id = db.Column(
|
||||
db.Integer,
|
||||
db.ForeignKey('user.id'),
|
||||
nullable=False
|
||||
)
|
||||
command = db.Column(db.String(), nullable=False)
|
||||
desc = db.Column(db.String(), nullable=False)
|
||||
arguments = db.Column(db.String(), nullable=True)
|
||||
logdir = db.Column(db.String(), nullable=True)
|
||||
start_time = db.Column(db.String(), nullable=True)
|
||||
end_time = db.Column(db.String(), nullable=True)
|
||||
exit_code = db.Column(db.Integer(), nullable=True)
|
||||
acknowledge = db.Column(db.String(), nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user