def get_content_all_messages(self):
"""
Get all messages
"""
try:
buffers = list()
with open(self.file_path, 'r') as fd:
fcntl.flock(fd, fcntl.LOCK_SH)
for row_msg in fd.readlines():
try:
msg = self.parse_row_message(row_msg)
buffers.append(json.loads(msg.content))
except Exception:
pass
fcntl.flock(fd, fcntl.LOCK_UN)
return buffers
except Exception:
return
评论列表
文章目录