Skip to content
New issue

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

GITC-165: Increase celery task_time_limit to account for longer running tasks (v2) #9294

Merged
merged 1 commit into from
Jul 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/dashboard/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def maybe_market_to_user_slack(self, bounty_pk, event_name, retry: bool = True)
maybe_market_to_user_slack_helper(bounty, event_name)


@app.shared_task(bind=True, max_retries=3)
@app.shared_task(bind=True, soft_time_limit=600, time_limit=660, max_retries=3)
def grant_update_email_task(self, pk, retry: bool = True) -> None:
"""
:param self:
Expand Down
2 changes: 1 addition & 1 deletion app/grants/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def lineno():
"""Returns the current line number in our program."""
return inspect.currentframe().f_back.f_lineno

@app.shared_task(bind=True, max_retries=1)
@app.shared_task(bind=True, soft_time_limit=600, time_limit=660, max_retries=1)
def update_grant_metadata(self, grant_id, retry: bool = True) -> None:

if settings.FLUSH_QUEUE:
Expand Down
2 changes: 1 addition & 1 deletion app/townsquare/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Lock timeout of 2 minutes (just in the case that the application hangs to avoid a redis deadlock)
LOCK_TIMEOUT = 60 * 2

@app.shared_task(bind=True, max_retries=3)
@app.shared_task(bind=True, soft_time_limit=600, time_limit=660, max_retries=3)
def increment_view_counts(self, pks, retry=False):
"""
:param self:
Expand Down