commons-app / commonsmisc

4 stars 5 forks source link

Reuse userId in all queries #7

Closed maskaravivek closed 5 years ago

maskaravivek commented 5 years ago

Fixes #8.

userId was being fetched a total of 5 times if feedback.py was called without any parameters ie. if all the statistics were queried.

I have extracted out the fetching of userId to a separate function and have started passing userId to the various functions instead of them querying the userId individually.

This should save us some time while trying to query all the statistics for a particular user.

urbanecm commented 5 years ago

Yup, I agree. Merging :-)

urbanecm commented 5 years ago

FTR, I've deployed this change.