fix: [worker 8] fix buffer concatenation

pull/8/head
Terrtia 2019-02-28 16:43:48 +01:00
parent 25d11be213
commit 7444bcdf7b
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 2 additions and 1 deletions

View File

@ -77,6 +77,7 @@ if __name__ == "__main__":
print('---- worker launched, uuid={} session_uuid={}'.format(uuid, session_uuid))
else:
########################### # TODO: clean db on error
print('Incorrect Stream, Closing worker: type={} session_uuid={}'.format(type, session_uuid))
sys.exit(1)
@ -117,7 +118,7 @@ if __name__ == "__main__":
else:
print('Error, infinite loop, max buffer length reached')
# force new line
buffer += b'{}\n'.format(data[b'message'])
buffer += b''.join([ data[b'message'], b'\n' ])
# save data on disk