codeforamerica/intake

View on GitHub
user_accounts/tasks.py

Summary

Maintainability
A
0 mins
Test Coverage
from celery import shared_task


@shared_task
def create_mailgun_route(user_profile_id):
    from intake.services.mailgun_api_service import set_route_for_user_profile
    from user_accounts.models import UserProfile
    # TODO: Fix whatever is causing circular imports.
    profile = UserProfile.objects.get(pk=user_profile_id)
    set_route_for_user_profile(profile)