Skip to content

Commit

Permalink
Merge pull request #12 from Winspain/feature-v1.0.0
Browse files Browse the repository at this point in the history
Feature v1.0.0
  • Loading branch information
Winspain authored Jan 5, 2023
2 parents 8b614f9 + eb8e122 commit 853e654
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Lottery/apps/lottery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def crawl_notice_task():
draw_num = latest_number['drawNum']
if not lottery_queryset.filter(drawNum=draw_num).exists():
break
if time.time() - begin_time > 1 * 3600:
return '运行超过1小时,自动停止'
if time.time() - begin_time > 3 * 3600:
return '运行超过3小时,自动停止'

serializer = Lottery500Serializer(data=latest_number)
if not serializer.is_valid():
Expand Down
4 changes: 2 additions & 2 deletions Lottery/easy_lottery/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
CELERY_RESULT_SERIALIZER = 'json'
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-time-limit
# TODO: set to whatever value is adequate in your circumstances
CELERY_TASK_TIME_LIMIT = 2 * 3600
CELERY_TASK_TIME_LIMIT = 6 * 3600
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-soft-time-limit
# TODO: set to whatever value is adequate in your circumstances
CELERY_TASK_SOFT_TIME_LIMIT = 2 * 3600
CELERY_TASK_SOFT_TIME_LIMIT = 6 * 3600
# http://docs.celeryproject.org/en/latest/userguide/configuration.html#beat-scheduler
CELERY_BEAT_SCHEDULER = 'django_celery_beat.schedulers:DatabaseScheduler'
CELERY_ENABLE_UTC = False
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
## Install

```
TODO:待更新
docker pull winspain0/easy_lottery:latest
```

## Usage
Expand Down

0 comments on commit 853e654

Please sign in to comment.