Commit c6577468 authored by Nicolas Wavrant's avatar Nicolas Wavrant

slaprunner: correctly writes slapgrid result after build&run

parent 20f84c4a
......@@ -146,7 +146,7 @@ mode = 0644
[template-supervisord]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
md5sum = 15500060605c0224d3534af60b07c6be
md5sum = 538dfcb373cef33f0041f6dca160802f
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = supervisord.conf.in
download-only = true
......@@ -155,7 +155,7 @@ mode = 0644
[template-listener-slapgrid]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
md5sum = d07b5a9c63dc21209692ee2966107a25
md5sum = 46495fb218fc771547c5ef861cc30933
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = listener_slapgrid.py.in
download-only = true
......
......@@ -26,7 +26,7 @@ def write_slapgrid_result():
info = server.supervisor.getProcessInfo(process)
result = dict()
result['last_build'] = datetime.datetime.fromtimestamp(info['stop']).strftime("%Y-%m-%d %H:%M:%S")
result['success'] = info['exitstatus']
result['success'] = (1 if info['statename'] == "FATAL" else info['exitstatus'])
open(file, 'w').write(json.dumps(result))
......
......@@ -44,6 +44,6 @@ environment = PATH="{{- supervisord['path'] -}}"
[eventlistener:listener-slapgrid]
command = {{ listener_slapgrid }}
events = PROCESS_STATE_EXITED
events = PROCESS_STATE_EXITED,PROCESS_STATE_FATAL,PROCESS_STATE_BACKOFF
stdout_logfile = {{ supervisord['no_logfile'] }}
stderr_logfile = {{ supervisord['stderr_logfile'] }}
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