MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / status

Function status

web/pgadmin/misc/bgprocess/__init__.py:56–75  ·  view source on GitHub ↗

Check the status of the process running in background. Sends back the output of stdout/stderr Fetches & sends STDOUT/STDERR logs for the process requested by client Args: pid: Process ID out: position of the last stdout fetched err: position of the last std

(pid, out=-1, err=-1)

Source from the content-addressed store, hash-verified

54)
55@pga_login_required
56def status(pid, out=-1, err=-1):
57 """
58 Check the status of the process running in background.
59 Sends back the output of stdout/stderr
60 Fetches & sends STDOUT/STDERR logs for the process requested by client
61
62 Args:
63 pid: Process ID
64 out: position of the last stdout fetched
65 err: position of the last stderr fetched
66
67 Returns:
68 Status of the process and logs (if out, and err not equal to -1)
69 """
70 try:
71 process = BatchProcess(id=pid)
72
73 return make_response(response=process.status(out, err))
74 except LookupError as lerr:
75 return gone(errormsg=str(lerr))
76
77
78@blueprint.route('/<pid>', methods=['PUT'], endpoint='acknowledge')

Callers

nothing calls this directly

Calls 4

statusMethod · 0.95
make_responseFunction · 0.90
goneFunction · 0.90
BatchProcessClass · 0.85

Tested by

no test coverage detected