Fix split buffer with inconsistently delimited json objects.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
3661e8bc74
commit
15d0c60a73
6 changed files with 62 additions and 22 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import json
|
||||
|
||||
from compose import utils
|
||||
|
||||
|
||||
|
|
@ -14,8 +12,7 @@ def stream_output(output, stream):
|
|||
lines = {}
|
||||
diff = 0
|
||||
|
||||
for chunk in utils.stream_as_text(output):
|
||||
event = json.loads(chunk)
|
||||
for event in utils.json_stream(output):
|
||||
all_events.append(event)
|
||||
|
||||
if 'progress' in event or 'progressDetail' in event:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue