close mongo connection

This commit is contained in:
耿伦伦
2021-12-01 23:44:25 +08:00
parent 481c2f8b6b
commit d61800b755
12 changed files with 21 additions and 3 deletions

View File

@ -59,6 +59,8 @@ class Base:
except Exception as e:
print(self.instance.common.method + ' persists error')
print(traceback.format_exc())
finally:
store.close()
def __str__(self):
pass

View File

@ -16,4 +16,4 @@ class RoomUserSeqMessage(Base):
return self.instance.totalUserStr
def __str__(self):
return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + '【观看人数】' + self.format_content()
return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + '【观看人数】' + '当前在线:' + str(self.instance.total) + ',历史总计:' + self.format_content()