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

Reduce logging to sentry #5054

Merged
merged 1 commit into from
Jan 3, 2019
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
20 changes: 16 additions & 4 deletions readthedocs/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
ProjectBuildsSkippedError,
VersionLockedError,
YAMLParseError,
BuildEnvironmentWarning,
)
from readthedocs.doc_builder.loader import get_builder_class
from readthedocs.doc_builder.python_environments import Conda, Virtualenv
Expand Down Expand Up @@ -272,7 +273,18 @@ def run(self, version_pk): # pylint: disable=arguments-differ
return False


@app.task(bind=True, max_retries=5, default_retry_delay=7 * 60)
@app.task(
bind=True,
max_retries=5,
default_retry_delay=7 * 60,
throws=(
VersionLockedError,
ProjectBuildsSkippedError,
YAMLParseError,
BuildTimeoutError,
ProjectBuildsSkippedError
)
)
def update_docs_task(self, project_id, *args, **kwargs):
step = UpdateDocsTaskStep(task=self)
return step.run(project_id, *args, **kwargs)
Expand Down Expand Up @@ -1022,15 +1034,15 @@ def update_search(version_pk, commit, delete_non_commit_files=True):
)


@app.task(queue='web')
@app.task(queue='web', throws=(BuildEnvironmentWarning,))
def symlink_project(project_pk):
project = Project.objects.get(pk=project_pk)
for symlink in [PublicSymlink, PrivateSymlink]:
sym = symlink(project=project)
sym.run()


@app.task(queue='web')
@app.task(queue='web', throws=(BuildEnvironmentWarning,))
def symlink_domain(project_pk, domain_pk, delete=False):
project = Project.objects.get(pk=project_pk)
domain = Domain.objects.get(pk=domain_pk)
Expand Down Expand Up @@ -1070,7 +1082,7 @@ def broadcast_remove_orphan_symlinks():
broadcast(type='web', task=remove_orphan_symlinks, args=[])


@app.task(queue='web')
@app.task(queue='web', throws=(BuildEnvironmentWarning,))
def symlink_subproject(project_pk):
project = Project.objects.get(pk=project_pk)
for symlink in [PublicSymlink, PrivateSymlink]:
Expand Down
3 changes: 3 additions & 0 deletions readthedocs/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ def USE_PROMOS(self): # noqa
},
}

# Sentry
SENTRY_CELERY_IGNORE_EXPECTED = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setting comes from https://docs.sentry.io/clients/python/integrations/django/#additional-settings (just linking for reference)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.
I should have added this in the description.


# Docker
DOCKER_ENABLE = False
DOCKER_IMAGE = 'readthedocs/build:2.0'
Expand Down