Skip to content

Commit

Permalink
Always run sync_versions on the default queue (#11965)
Browse files Browse the repository at this point in the history
This is so we can better support custom queues,
but not block sync versions on them.
  • Loading branch information
ericholscher authored Jan 30, 2025
1 parent 2e65033 commit 1f91660
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 0 additions & 6 deletions readthedocs/core/views/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ def trigger_sync_versions(project):
log.info("Skipping sync versions for project.", project_slug=project.slug)
return None

options = {}
if project.build_queue:
# respect the queue for this project
options["queue"] = project.build_queue

_, build_api_key = BuildAPIKey.objects.create_key(project=project)

log.debug(
Expand All @@ -117,7 +112,6 @@ def trigger_sync_versions(project):
sync_repository_task.apply_async(
args=[version.pk],
kwargs={"build_api_key": build_api_key},
**options,
)
return version.slug
except Exception:
Expand Down
5 changes: 4 additions & 1 deletion readthedocs/rtd_tests/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1806,6 +1806,9 @@ def test_webhook_skipped_project(self, trigger_build):
def test_sync_repository_custom_project_queue(
self, sync_repository_task, trigger_build
):
"""
Check that the custom queue isn't used for sync_repository_task.
"""
client = APIClient()
self.project.build_queue = "specific-build-queue"
self.project.save()
Expand Down Expand Up @@ -1836,7 +1839,7 @@ def test_sync_repository_custom_project_queue(
kwargs={
"build_api_key": mock.ANY,
},
queue="specific-build-queue",
# No queue
)

def test_github_webhook_for_branches(self, trigger_build):
Expand Down

0 comments on commit 1f91660

Please sign in to comment.