Skip to content

Commit

Permalink
refactor queue names/urls
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Mar 19, 2024
1 parent 7875c8e commit be3ea64
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions framework/celery_tasks/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def match_by_module(task_path):
return CeleryConfig.task_high_queue
if task_subpath in CeleryConfig.remote_computing_modules:
return CeleryConfig.task_remote_computing_queue
if task_subpath in CeleryConfig.account_status_changes:
return CeleryConfig.account_status_changes
if task_subpath in CeleryConfig.task_account_status_changes_queue:
return CeleryConfig.task_account_status_changes_queue
return CeleryConfig.task_default_queue


Expand Down
8 changes: 4 additions & 4 deletions osf/external/messages/celery_publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def publish_deactivated_user(user):
_publish_user_status_change.s(
body={
'action': 'deactivate',
'user_uri': user.url,
'user_uri': user.get_semantic_iri(),
},
)
)
Expand All @@ -19,7 +19,7 @@ def publish_reactivate_user(user):
_publish_user_status_change.s(
body={
'action': 'reactivate',
'user_uri': user.url,
'user_uri': user.get_semantic_iri(),
},
)
)
Expand All @@ -31,8 +31,8 @@ def publish_merged_user(user):
_publish_user_status_change.s(
body={
'action': 'merge',
'user_uri': user.url,
'merged_user_uri': user.merged_by.url,
'user_uri': user.get_semantic_iri(),
'merged_user_uri': user.merged_by.get_semantic_iri(),
},
)
)
Expand Down
4 changes: 2 additions & 2 deletions website/settings/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ class CeleryConfig:
task_med_queue = 'med'
task_high_queue = 'high'
task_remote_computing_queue = 'remote'
account_status_changes = 'account_status_changes'
task_account_status_changes_queue = 'account_status_changes'

remote_computing_modules = {
'addons.boa.tasks.submit_to_boa',
Expand Down Expand Up @@ -489,7 +489,7 @@ class CeleryConfig:
routing_key=task_med_queue, consumer_arguments={'x-priority': 1}),
Queue(task_high_queue, Exchange(task_high_queue),
routing_key=task_high_queue, consumer_arguments={'x-priority': 10}),
Queue(account_status_changes, Exchange(account_status_changes), routing_key=account_status_changes)
Queue(task_account_status_changes_queue, Exchange(task_account_status_changes_queue), routing_key=task_account_status_changes_queue)
)

task_default_exchange_type = 'direct'
Expand Down

0 comments on commit be3ea64

Please sign in to comment.