Skip to content

Commit

Permalink
Merge pull request #741 from readthedocs/davidfischer/simplifies-dail…
Browse files Browse the repository at this point in the history
…y-reports-development

Simplify daily-reports tasks in dev
  • Loading branch information
davidfischer committed May 11, 2023
2 parents 5551c22 + 41694ef commit 258bf4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
7 changes: 7 additions & 0 deletions adserver/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,13 @@ def daily_update_publishers(day=None):
)


@app.task(time_limit=60 * 60 * 4)
def daily_update_reports():
"""Update today's report data rather than the previous day."""
day, _ = get_day()
update_previous_day_reports(day)


@app.task(time_limit=60 * 60 * 4)
def update_previous_day_reports(day=None):
"""
Expand Down
24 changes: 2 additions & 22 deletions config/settings/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,8 @@
CELERY_CREATE_MISSING_QUEUES = True

CELERY_BEAT_SCHEDULE = {
"dev-geo-index": {
"task": "adserver.tasks.daily_update_geos",
"schedule": crontab(minute="*/5"),
},
"dev-placement-index": {
"task": "adserver.tasks.daily_update_placements",
"schedule": crontab(minute="*/5"),
},
"dev-keyword-index": {
"task": "adserver.tasks.daily_update_keywords",
"schedule": crontab(minute="*/5"),
},
"dev-uplift-index": {
"task": "adserver.tasks.daily_update_uplift",
"schedule": crontab(minute="*/5"),
},
"dev-advertiser-index": {
"task": "adserver.tasks.daily_update_advertisers",
"schedule": crontab(minute="*/5"),
},
"dev-publisher-index": {
"task": "adserver.tasks.daily_update_publishers",
"dev-update-reports": {
"task": "adserver.tasks.daily_update_reports",
"schedule": crontab(minute="*/5"),
},
}

0 comments on commit 258bf4d

Please sign in to comment.