from django.core.management import execute_from_command_line
from intranet.search.settings.utils import setup_environ


def manage():
    setup_environ()
    return execute_from_command_line()


def celery_main():
    from celery.bin.celery import main
    setup_environ()
    return main()
