mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
runbot log odoo stderr into logfile
revert commit dea869273a9a03f6f58993c3fa558a916cb8e4a5
phantomjs stderr is now discarded since odoo commit
5a642a802e
no need to discard odoo stderr from logfile.
Close #49
This commit is contained in:
parent
eaf9d44485
commit
609cf0fbdf
@ -703,7 +703,7 @@ class runbot_build(osv.osv):
|
||||
|
||||
return cmd, modules
|
||||
|
||||
def spawn(self, cmd, lock_path, log_path, cpu_limit=None, shell=False, showstderr=False):
|
||||
def spawn(self, cmd, lock_path, log_path, cpu_limit=None, shell=False):
|
||||
def preexec_fn():
|
||||
os.setsid()
|
||||
if cpu_limit:
|
||||
@ -717,11 +717,7 @@ class runbot_build(osv.osv):
|
||||
lock(lock_path)
|
||||
out=open(log_path,"w")
|
||||
_logger.debug("spawn: %s stdout: %s", ' '.join(cmd), log_path)
|
||||
if showstderr:
|
||||
stderr = out
|
||||
else:
|
||||
stderr = open(os.devnull, 'w')
|
||||
p=subprocess.Popen(cmd, stdout=out, stderr=stderr, preexec_fn=preexec_fn, shell=shell)
|
||||
p=subprocess.Popen(cmd, stdout=out, stderr=out, preexec_fn=preexec_fn, shell=shell)
|
||||
return p.pid
|
||||
|
||||
def github_status(self, cr, uid, ids, context=None):
|
||||
@ -829,7 +825,7 @@ class runbot_build(osv.osv):
|
||||
# f.close()
|
||||
#cmd=[self.client_web_bin_path]
|
||||
|
||||
return self.spawn(cmd, lock_path, log_path, cpu_limit=None, showstderr=True)
|
||||
return self.spawn(cmd, lock_path, log_path, cpu_limit=None)
|
||||
|
||||
def force(self, cr, uid, ids, context=None):
|
||||
"""Force a rebuild"""
|
||||
|
Loading…
Reference in New Issue
Block a user