Skip to content

Commit 1f91660

Browse files
authored
Always run sync_versions on the default queue (#11965)
This is so we can better support custom queues, but not block sync versions on them.
1 parent 2e65033 commit 1f91660

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

readthedocs/core/views/hooks.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ def trigger_sync_versions(project):
102102
log.info("Skipping sync versions for project.", project_slug=project.slug)
103103
return None
104104

105-
options = {}
106-
if project.build_queue:
107-
# respect the queue for this project
108-
options["queue"] = project.build_queue
109-
110105
_, build_api_key = BuildAPIKey.objects.create_key(project=project)
111106

112107
log.debug(
@@ -117,7 +112,6 @@ def trigger_sync_versions(project):
117112
sync_repository_task.apply_async(
118113
args=[version.pk],
119114
kwargs={"build_api_key": build_api_key},
120-
**options,
121115
)
122116
return version.slug
123117
except Exception:

readthedocs/rtd_tests/tests/test_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,6 +1806,9 @@ def test_webhook_skipped_project(self, trigger_build):
18061806
def test_sync_repository_custom_project_queue(
18071807
self, sync_repository_task, trigger_build
18081808
):
1809+
"""
1810+
Check that the custom queue isn't used for sync_repository_task.
1811+
"""
18091812
client = APIClient()
18101813
self.project.build_queue = "specific-build-queue"
18111814
self.project.save()
@@ -1836,7 +1839,7 @@ def test_sync_repository_custom_project_queue(
18361839
kwargs={
18371840
"build_api_key": mock.ANY,
18381841
},
1839-
queue="specific-build-queue",
1842+
# No queue
18401843
)
18411844

18421845
def test_github_webhook_for_branches(self, trigger_build):

0 commit comments

Comments
 (0)