Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.

Commit 571f0bf

Browse files
committed
improvement: update demo_proj settings for crontab and scrapy
1 parent 122fdfe commit 571f0bf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

demo_proj/ncov/settings.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@
186186
# 每分钟抓取丁香园数据一次
187187
('*/1 * * * *', 'django.core.management.call_command', ['crawl', 'dxy']),
188188

189-
# 每小时0分时开始抓取 covidtracking 数据一次
190-
('0 * * * *', 'django.core.management.call_command', ['crawl', 'covidtracking'])
189+
# 每隔1小时开始抓取 covidtracking 数据一次
190+
('*/60 * * * *', 'django.core.management.call_command', ['crawl', 'covidtracking']),
191191
)
192+
193+
# scrapy 日志文件路径
194+
SCRAPY_LOG_FILE = '/var/tmp/django-covid19-spider.log'

0 commit comments

Comments
 (0)