add job 执行异常的 邮件报警逻辑
All checks were successful
Gitea Actions Demo / host-commands (push) Successful in 0s

This commit is contained in:
2026-02-20 19:03:02 +08:00
parent ac6c881763
commit f93fda8efa
6 changed files with 103 additions and 4 deletions

View File

@ -22,6 +22,15 @@ class Settings(BaseSettings):
DB_PASS: str
DB_NAME: str
# 邮件发送配置
SMTP_HOST: str = Field("SMTP_HOST")
SMTP_PORT: int = Field(587, env="SMTP_PORT")
SMTP_USER: str = Field("SMTP_USER")
SMTP_PASSWORD: str = Field("SMTP_PASSWORD")
SMTP_USE_TLS: bool = Field(True, env="SMTP_USE_TLS")
SMTP_FROM: str = Field("SMTP_FROM")
ERROR_NOTIFICATION_EMAIL: str = Field("ERROR_NOTIFICATION_EMAIL")
class Config:
env_file = ".env"
env_file_encoding = "utf-8"