def run(self):
try:
self._compress_streaming_json()
except IOError as e:
if e.errno == errno.EPIPE:
# just stop if the pipe breaks
pass
else:
raise
finally:
self._close_file()