I'm calling a management command from a view as follows:
from django.http import JsonResponse
from django.core.management import call_command
def index(request):
call_command('mymanagementcommand')
response = {'result': 'success',
'message': 'thank you, come again'}
return JsonResponse(response)
I don't want to wait for my management command to finish before continuing through the view and returning the response. In this case, "success" just means that the command has been called and is unconcerned whether that command ran successfully.
Is there a djangoy way for me to just fire it off in the background and not wait for it?
Thanks!