0

I recently started playing around with django-social-auth and am looking for some help from the community to figure out the best way to move forward with an idea.

Once a user has registered you have access to his oauth token which allows you to pull certain data.

In my case I want to build a nice little profile based on the users avatar, location and maybe some other information if it's available.

Would the best way be to:

  • build a custom task for celery and pull the information and build the profile?
  • or, make use of signals to build the profile?
ApPeL
  • 4,801
  • 9
  • 47
  • 84

1 Answers1

1

This really comes down to synchronous vs asynchronous. Django signals are synchronous that is they will block the response until they are completed. Celery tasks are asynchronous.

Which will be better will depend on whether the benefits of handling the profile building asynchronously outweighs the negatives of the maintaining the extra infrastructure necessary for celery.

It's basically impossible to answer this without a lot more specific information regarding the specifics of your situation.

John
  • 5,166
  • 27
  • 31