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

refactor apps.mobile_app.tasks into individual task files #2888

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

joeyorlando
Copy link
Contributor

@joeyorlando joeyorlando commented Aug 28, 2023

What this PR does

Closes #2722

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • CHANGELOG.md updated (or pr:no changelog PR label added if not required)

@joeyorlando joeyorlando added pr:no changelog pr:no public docs Added to a PR that does not require public documentation updates labels Aug 28, 2023
@joeyorlando joeyorlando requested review from a team and vstpme August 28, 2023 11:48


@shared_dedicated_queue_retry_task(autoretry_for=(Exception,), retry_backoff=True, max_retries=MAX_RETRIES)
def notify_user_async(user_pk, alert_group_pk, notification_policy_pk, critical):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it would make sense to rename this task to something more descriptive (ex. notify_user_about_alert_group).

What is the order of operations for renaming a task? Can I simply rename it, leave the old task routing definition in place + add the new one, then remove the old one in a future release?

Copy link
Member

Choose a reason for hiding this comment

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

I would create the new one, add it to routing and call wherever it's needed and leave the old, just change its code to call the new task. Then the old one can be removed in a future release.

@joeyorlando joeyorlando merged commit cba4ccb into dev Aug 29, 2023
@joeyorlando joeyorlando deleted the jorlando/refactor-mobile-app-tasks branch August 29, 2023 09:34
joeyorlando added a commit that referenced this pull request Aug 29, 2023
…roup (#2900)

# What this PR does

Follow up to #2888, rename `notify_user_async` celery task to
`notify_user_about_new_alert_group`.

## 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor engine/apps/mobile_app/tasks.py into smaller individual task files
2 participants