Skip to content

Commit

Permalink
add create_slack_connector_async_v2 celery task to CELERY_TASK_ROUTES…
Browse files Browse the repository at this point in the history
… + remove deprecated celery tasks (#2946)

# What this PR does
- add `common.oncall_gateway.tasks.create_slack_connector_async_v2`
celery task to `CELERY_TASK_ROUTES`
- remove two deprecated tasks in `common.oncall_gateway.tasks`

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
  • Loading branch information
joeyorlando authored Sep 1, 2023
1 parent e472b03 commit 5c189c8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
20 changes: 0 additions & 20 deletions engine/common/oncall_gateway/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,6 @@ def delete_oncall_connector_async(oncall_org_id):
raise e


# deprecated
@shared_dedicated_queue_retry_task(
autoretry_for=(Exception,),
retry_backoff=True,
max_retries=None,
)
def create_slack_connector_async(slack_id, backend):
pass


# deprecated
@shared_dedicated_queue_retry_task(
autoretry_for=(Exception,),
retry_backoff=True,
max_retries=None,
)
def delete_slack_connector_async(slack_id):
pass


@shared_dedicated_queue_retry_task(
autoretry_for=(Exception,),
retry_backoff=True,
Expand Down
4 changes: 1 addition & 3 deletions engine/common/tests/test_task_queue_assignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
we should avoid @shared_dedicated_queue_retry_task or @shared_task and
remove entirely if it is not needed.
"""
COMMON_IGNORED_TASKS = {
"common.oncall_gateway.tasks.create_slack_connector_async_v2",
}
COMMON_IGNORED_TASKS = set()


def check_celery_task_route_mapping(task_ids, ignored_prefixes, additional_ignored_tasks=None):
Expand Down
3 changes: 1 addition & 2 deletions engine/settings/celery_task_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"apps.alerts.tasks.wipe.wipe": {"queue": "default"},
"common.oncall_gateway.tasks.create_oncall_connector_async": {"queue": "default"},
"common.oncall_gateway.tasks.delete_oncall_connector_async": {"queue": "default"},
"common.oncall_gateway.tasks.create_slack_connector_async": {"queue": "default"},
"common.oncall_gateway.tasks.delete_slack_connector_async": {"queue": "default"},
"common.oncall_gateway.tasks.create_slack_connector_async_v2": {"queue": "default"},
"common.oncall_gateway.tasks.delete_slack_connector_async_v2": {"queue": "default"},
"apps.heartbeat.tasks.integration_heartbeat_checkup": {"queue": "default"},
"apps.heartbeat.tasks.process_heartbeat_task": {"queue": "default"},
Expand Down

0 comments on commit 5c189c8

Please sign in to comment.