ContextLab / brainfit-task

a package for acquiring fitness tracker (Fitbit) and cognitive task (JsPsych) data on the Amazon Mechanical Turk platform
2 stars 0 forks source link

Address missing Fitbit files #23

Open gmnotaro opened 6 years ago

gmnotaro commented 6 years ago

For some participants, not all Fitbit files were retrieved - this could be due to the chain of Promises/fetches used to get the files (one failed retrieval might be crashing the rest), or it's an issue of slow internet connections, in which closing the window too soon stops the retrieval of files. First step would probably be to implement some kind of page timer that will wait a "safe" amount of time for all files to be retrieved before allowing the window to be closed (or better yet, automatically close the popup authorization window once all files are retrieved)

gmnotaro commented 6 years ago

This might also be an issue depending on what type of device they have and thus which metrics are recorded - perhaps need to implement a check based on the device file before defining the scope of which files to retrieve using the Fitbit API