feat:站点使用统计

This commit is contained in:
jxxghp
2024-04-17 12:42:32 +08:00
parent 5108dbbeb5
commit c3ffe38d4d
7 changed files with 135 additions and 10 deletions

View File

@ -13,20 +13,18 @@ class SiteStatistic(Base):
id = Column(Integer, Sequence('id'), primary_key=True, index=True)
# 域名Key
domain = Column(String, index=True)
# 站点名
name = Column(String, nullable=False)
# 成功次数
success = Column(Integer)
# 失败次数
fail = Column(Integer)
# 平均耗时 秒
seconds = Column(Integer)
# 耗时记录 Json
note = Column(String)
# 最后一次访问状态 0-成功 1-失败
lst_state = Column(Integer)
# 最后访问时间
lst_mod_date = Column(String, default=datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
# 耗时记录 Json
note = Column(String)
@staticmethod
@db_query