mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 20:01:33 +00:00
Implement 'tail' on stderr feedback
This commit is contained in:
parent
f874deff6e
commit
36724c5c51
@ -1,6 +1,7 @@
|
||||
import xmlrpc.client
|
||||
from contextlib import suppress
|
||||
from xmlrpc.client import Fault as SupervisorFault
|
||||
from os import remove
|
||||
|
||||
from tfw.config import tfwenv
|
||||
|
||||
@ -16,7 +17,10 @@ class SupervisorMixin:
|
||||
self.supervisor.startProcess(process_name)
|
||||
|
||||
def read_log(self, process_name):
|
||||
return self.supervisor.readProcessStderrLog(process_name, 0, 0)
|
||||
logs = self.supervisor.readProcessStderrLog(process_name, 0, 0)
|
||||
remove(self.supervisor.getProcessInfo(process_name)['stderr_logfile'])
|
||||
self.supervisor.clearProcessLogs(process_name)
|
||||
return logs
|
||||
|
||||
def restart_process(self, process_name):
|
||||
self.stop_process(process_name)
|
||||
|
Loading…
Reference in New Issue
Block a user