We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
下面的方法 需要增加 路径是否存在的判断: def hn_daily_job(hacker_news_client, report_generator, notifier): LOG.info("[开始执行定时任务]Hacker News 今日前沿技术趋势") # 获取当前日期,并格式化为 'YYYY-MM-DD' 格式 date = datetime.now().strftime('%Y-%m-%d') # 生成每日汇总报告的目录路径 directory_path = os.path.join('hacker_news', date) # 生成每日汇总报告并保存 report, _ = report_generator.generate_hn_daily_report(directory_path) notifier.notify_hn_report(date, report) LOG.info(f"[定时任务执行完毕]")
######修改为#########
def hn_daily_job(hacker_news_client, report_generator, notification_service): LOG.info("[开始执行定时任务]Hacker News 今日前沿技术趋势") # 获取当前日期,并格式化为 'YYYY-MM-DD' 格式 date = datetime.now().strftime('%Y-%m-%d') # 生成每日汇总报告的目录路径 directory_path = os.path.join('hacker_news', date) # 确保目录存在 os.makedirs(directory_path, exist_ok=True) # 生成每日汇总报告并保存 report, _ = report_generator.generate_hn_daily_report(directory_path) notification_service.send_email(f"[HackerNews] {date} 技术趋势", report) LOG.info(f"[定时任务执行完毕]")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
下面的方法 需要增加 路径是否存在的判断:
def hn_daily_job(hacker_news_client, report_generator, notifier):
LOG.info("[开始执行定时任务]Hacker News 今日前沿技术趋势")
# 获取当前日期,并格式化为 'YYYY-MM-DD' 格式
date = datetime.now().strftime('%Y-%m-%d')
# 生成每日汇总报告的目录路径
directory_path = os.path.join('hacker_news', date)
# 生成每日汇总报告并保存
report, _ = report_generator.generate_hn_daily_report(directory_path)
notifier.notify_hn_report(date, report)
LOG.info(f"[定时任务执行完毕]")
######修改为#########
def hn_daily_job(hacker_news_client, report_generator, notification_service):
LOG.info("[开始执行定时任务]Hacker News 今日前沿技术趋势")
# 获取当前日期,并格式化为 'YYYY-MM-DD' 格式
date = datetime.now().strftime('%Y-%m-%d')
# 生成每日汇总报告的目录路径
directory_path = os.path.join('hacker_news', date)
# 确保目录存在
os.makedirs(directory_path, exist_ok=True)
# 生成每日汇总报告并保存
report, _ = report_generator.generate_hn_daily_report(directory_path)
notification_service.send_email(f"[HackerNews] {date} 技术趋势", report)
LOG.info(f"[定时任务执行完毕]")
The text was updated successfully, but these errors were encountered: