Making one small change to ease debugging loading a commented JSON file

Summary:
Adding some local-run, debugging conveniences

Making one small change to ease debugging loading a commented JSON file

Adding some local-run, debugging conveniences

Add debug output when downloaded entities fall outside the window in which they should have been updated.  This is to help debug why our gae_download.py script is not downloading the number of entities we expect.

Decomposing into a seperate function

Test Plan:
1. Tried adding comments with //, didn't work
2. Did this to figure out why (added a print statement too)
3. Figured it'd be good to checkin (and clean up the unnecessary EOL whitespaces)

Ran:
mattfaus@mattfaus:~/dev/analytics/src
$ python gae_download.py -c ../cfg/gae_download.json --start_date "2013-05-23T13:50:00Z" --end_date "2013-05-24T12:10:30Z"

With:
  "dbhost": "",
in gae_download.json

1. Tried adding comments with //, didn't work
2. Did this to figure out why (added a print statement too)
3. Figured it'd be good to checkin (and clean up the unnecessary EOL whitespaces)

Ran:
mattfaus@mattfaus:~/dev/analytics/src
$ python gae_download.py -c ../cfg/gae_download.json --start_date "2013-05-23T13:50:00Z" --end_date "2013-05-24T12:10:30Z"

With:
  "dbhost": "",
in gae_download.json

(analytics)
mattfaus@mattfaus:~/dev/analytics/src
$ python gae_download.py -c ../cfg/gae_download.json --start_date "2013-05-23T13:50:00Z" --end_date "2013-05-24T12:10:30Z"

Saw output:

[INFO 2013-05-23 13:54:38,358] backup_timestamp on a UserData = 2013-05-23 20:43:52 was actually after the window 2013-05-23 14:00:00 to 2013-05-23 14:10:00 by -1 day, 17:26:08
[INFO 2013-05-23 13:55:35,823] backup_timestamp on a UserData = 2013-05-23 15:49:24 was actually after the window 2013-05-23 15:30:00 to 2013-05-23 15:40:00 by -1 day, 23:50:36
[INFO 2013-05-23 13:56:42,571] backup_timestamp on a UserData = 2013-05-23 16:39:47 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 0:20:13
[INFO 2013-05-23 13:56:42,786] backup_timestamp on a UserData = 2013-05-23 15:51:26 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 1:08:34
[INFO 2013-05-23 13:56:42,789] backup_timestamp on a UserData = 2013-05-23 16:52:07 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 0:07:53
[INFO 2013-05-23 13:56:42,796] backup_timestamp on a UserData = 2013-05-23 16:59:07 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 0:00:53
[INFO 2013-05-23 13:56:42,809] backup_timestamp on a UserData = 2013-05-23 16:42:25 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 0:17:35
[INFO 2013-05-23 13:56:42,840] backup_timestamp on a UserData = 2013-05-23 16:40:04 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 0:19:56
[INFO 2013-05-23 13:56:42,843] backup_timestamp on a UserData = 2013-05-23 15:49:26 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 1:10:34
[INFO 2013-05-23 13:56:42,847] backup_timestamp on a UserData = 2013-05-23 15:51:45 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 1:08:15

Ran:
mattfaus@mattfaus:~/dev/analytics/src
$ python gae_download.py -c ../cfg/gae_download.json --start_date "2013-05-23T13:50:00Z" --end_date "2013-05-24T12:10:30Z"

With:
"dbhost": "",
in gae_download.json

(analytics)
mattfaus@mattfaus:~/dev/analytics/src
$ python gae_download.py -c ../cfg/gae_download.json --start_date "2013-05-23T13:50:00Z" --end_date "2013-05-24T12:10:30Z"

Saw output:

[INFO 2013-05-23 13:54:38,358] backup_timestamp on a UserData = 2013-05-23 20:43:52 was actually after the window 2013-05-23 14:00:00 to 2013-05-23 14:10:00 by -1 day, 17:26:08
[INFO 2013-05-23 13:55:35,823] backup_timestamp on a UserData = 2013-05-23 15:49:24 was actually after the window 2013-05-23 15:30:00 to 2013-05-23 15:40:00 by -1 day, 23:50:36
[INFO 2013-05-23 13:56:42,571] backup_timestamp on a UserData = 2013-05-23 16:39:47 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 0:20:13
[INFO 2013-05-23 13:56:42,786] backup_timestamp on a UserData = 2013-05-23 15:51:26 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 1:08:34
[INFO 2013-05-23 13:56:42,789] backup_timestamp on a UserData = 2013-05-23 16:52:07 was actually before the window 2013-05-23 17:00:00 to 2013-05-23 17:10:00 by 0:07:53

Reviewers: jace

Reviewed By: jace

Differential Revision: http://phabricator.khanacademy.org/D2424