kpwhri / heartsteps

Heart Steps 2.0 Application
8 stars 1 forks source link

Fitbit API Subscriptions not activating #222

Open patrick9958 opened 3 years ago

patrick9958 commented 3 years ago

Some U01 participants have issues where the Fitbit API does not send subscription updates causing inaccurate Fitbit data, persistent stale data, and a lack of communication between Fitbit and Heartsteps.

To reproduce, create a new fitbit account, create a new heartsteps user, register the heartsteps user with the new fitbit account on the dev server and login to the new heartsteps user on your phone. Try sending a fitbit update by sending fake data (i.e. registering that you completed a 30 minute walk within the heartsteps app). This should call the subscribe_to_fitbit() function and update your user's status within the dev server's dashboard. If it fails to update, you have successfully reproduced the bug.

nickdotreid commented 3 years ago

@patrick9958 I don't see a description on this ticket and just want to check and see if you know what you are trying to reproduce and fix.

The subscription call is asynchronous, so you'll need to have celery worker running if you want to reproduce the functionality locally. Otherwise the task will get queued but never run.

# Something like this will run the development server and celery
$ docker-compose run server honcho start dev celery