<filename>posts_api/posts/tasks.py
from celery import shared_task
from django.core.management import call_command


@shared_task
def reset_upvotes():
    call_command("reset_upvotes")

<filename>posts_api/posts/tasks.py
from celery import shared_task
from django.core.management import call_command


@shared_task
def reset_upvotes():
    call_command("reset_upvotes")
