HabitRPG/habitrpg — pull request #3956 by Alys (2014-08-30 23:13:39+00:00)
Title: increase number of gems for contributors -- fixes https://github.com/HabitRPG/habitrpg/issues/3933

@lefnire: There are two scripts to be run, in this order:

- 20140831_increase_gems_for_previous_contributions.js : Finds all contributors (tier 8 and below) and increases their gems. Displays output for every user to show how many gems they had and how many are added.

- 20140831_increase_gems_for_previous_contributions_FINAL_CHECK.js : Find all contributors and displays their current gems balance - i.e., their gems AFTER the increase has been applied.

The output from both scripts should be captured to files and saved somewhere safe so that if any contributors tell us that they haven't received their correct gem increase, we can check what actually happened.

The second script should be run immediately after the first to minimise the chance of contributors making their own gem changes while the scripts are running, which would mess up our records. I couldn't work out how to combine the final database check into the first script because it's all asynchronous(?) and creating a new database cursor for the user that was just processed didn't seem to work. Is there a better way I could have done this?

Note the comment "UNCOMMENT ONE OF THESE LINES" in each script.