mirror of https://github.com/D4-project/d4-core
fix: [worker 8] fix buffer concatenation
parent
25d11be213
commit
7444bcdf7b
|
@ -77,6 +77,7 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
print('---- worker launched, uuid={} session_uuid={}'.format(uuid, session_uuid))
|
print('---- worker launched, uuid={} session_uuid={}'.format(uuid, session_uuid))
|
||||||
else:
|
else:
|
||||||
|
########################### # TODO: clean db on error
|
||||||
print('Incorrect Stream, Closing worker: type={} session_uuid={}'.format(type, session_uuid))
|
print('Incorrect Stream, Closing worker: type={} session_uuid={}'.format(type, session_uuid))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
@ -117,7 +118,7 @@ if __name__ == "__main__":
|
||||||
else:
|
else:
|
||||||
print('Error, infinite loop, max buffer length reached')
|
print('Error, infinite loop, max buffer length reached')
|
||||||
# force new line
|
# force new line
|
||||||
buffer += b'{}\n'.format(data[b'message'])
|
buffer += b''.join([ data[b'message'], b'\n' ])
|
||||||
|
|
||||||
|
|
||||||
# save data on disk
|
# save data on disk
|
||||||
|
|
Loading…
Reference in New Issue