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)
| 54 | ) |
| 55 | @pga_login_required |
| 56 | def 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') |
nothing calls this directly
no test coverage detected