Skip to content

Instantly share code, notes, and snippets.

@Quard
Created April 10, 2019 12:56
Show Gist options
  • Save Quard/8538d286b95451377ad22decd7627f48 to your computer and use it in GitHub Desktop.
Save Quard/8538d286b95451377ad22decd7627f48 to your computer and use it in GitHub Desktop.
The Python Celery Cookbook: Small Tool, Big Possibilities
def view(request):
find_job = find_best_service_provider_for_user.delay(request.user.pk)
# do other stuff
calculations_results = find_job.get().join()
# process calculations_results and send response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment