Singly/hallway — pull request #583 by smurthas (2012-10-02 05:27:16+00:00)
Title: Fitbit Fixes

This fixes several problems that emerged during the Sync Parallel work.

1. activities, sleep, fat, and weight were all sharing a `activeNext` config variable. Each time any one of them was run, it would increment the `activeNext` day, which cause all the others to skip the current day.

2. The devices synclet was setting the setting the lastSyncTime (the last time a device was synced to fitbit.com), but it was just looking at the first device returned from the fitbit API, so it would skip data if either the SCALE device of TRACKER device got a day ahead (which happens all the time due to ppl not syncing both everyday).

This can (and should) be pulled in before the Sync Parallel branch.

Without a migration it will take 24hrs for all the synclets to run and fix their own configs. The devices synclet needs to run in order for the values to get properly updated.

Could someone else with a decent amount of fitbit data try this? Please ensure that for all data you have (at least weight and sleep), there aren't any missing days (you need to check it against fitbit.com)

FYI, you will get rate limited at about 150 calls per hour, but that should be plenty to get a good sample and verify the above.