Commit 40a59c34 authored by Boxiang Sun's avatar Boxiang Sun

list all not running on-watch service

parent 1b479ee7
......@@ -893,16 +893,19 @@ class Partition(object):
print(service_list)
has_failed_on_watch_process = False
bad_service_list = []
with self.getSupervisorRPC() as supervisor:
all_process = supervisor.getAllProcessInfo()
print(all_process)
for process in all_process:
if 'on-watch' in process['name'] and process['statename'] != "RUNNING":
self.logger.info('On watch service %r is not running' % process['name'])
has_failed_on_watch_process = True
if has_failed_on_watch_process:
raise ChildProcessError("Some on-watch process is not running, please check the log.")
bad_service_list.append(process['name'])
if len(bad_service_list) > 0:
raise ChildProcessError(
"The following on-watch service(es) is not running, \
for the details, please check the corresponding log: %s",
'\n'.join(bad_service_list))
def cleanupFolder(self, folder_path):
"""Delete all files and folders in a specified directory
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment