mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 02:26:16 +01:00
- add support for streaming build log, while it is being written (patch
by Christoph Thiel)
This commit is contained in:
parent
ae285de206
commit
29fa2b0810
@ -558,7 +558,13 @@ usage: log <platform> <arch>
|
|||||||
|
|
||||||
platform = args[0]
|
platform = args[0]
|
||||||
arch = args[1]
|
arch = args[1]
|
||||||
print ''.join(get_log(project, package, platform, arch))
|
offset = 0
|
||||||
|
while True:
|
||||||
|
log_chunk = get_log(project, package, platform, arch, offset)
|
||||||
|
if len(log_chunk) == 0:
|
||||||
|
break
|
||||||
|
offset += len(log_chunk)
|
||||||
|
print log_chunk.strip()
|
||||||
|
|
||||||
|
|
||||||
def history(args):
|
def history(args):
|
||||||
|
@ -1004,10 +1004,10 @@ def get_results(prj, package, platform):
|
|||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
def get_log(prj, package, platform, arch):
|
def get_log(prj, package, platform, arch, offset):
|
||||||
u = makeurl(['result', prj, platform, package, arch, 'log'])
|
u = makeurl(['result', prj, platform, package, arch, 'log?nostream=1&start=%s' % offset])
|
||||||
f = urllib2.urlopen(u)
|
f = urllib2.urlopen(u)
|
||||||
return f.readlines()
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
def get_history(prj, package):
|
def get_history(prj, package):
|
||||||
|
Loading…
Reference in New Issue
Block a user