To answer the direct question being asked in the title, you can’t. The response to the client’s request ends the view. To do otherwise requires an external handler like a celery task.
So in this case, I’d accept the data, validate it to the degree possible, call the celery task with that received data, and return the response. The celery task can take as long as necessary to actually process the data.