openhatch/oh-mainline — pull request #304 by eeshangarg (2014-07-16 17:35:43+00:00)
Title: Fixed profile_hourly_tasks.py

Fixed: Issue 1016 Cron cd $HOME/milestone-a ; ./mysite/scripts/run_with_lock.sh python manage.py profile_hourly_tasks 2>&1 | grep -v DeprecationWarning | grep -v 'import ' | grep -v SubfieldBase (fwd)

I tested my fix by typing the following command into the command line manually:
./mysite/scripts/run_with_lock.sh python manage.py profile_hourly_tasks 2>&1 | grep -v DeprecationWarning | grep -v 'import ' | grep -v SubfieldBase

I am not sure whether this is the best way to test this, but profile_hourly_tasks.py does not throw an exception after this fix and test. @paulproteus also suggested that I write a unittest for this command but I wasn't able to figure out how to do this as I have never worked with tests before. I would be willing to work on the tests but I feel that I would need some guidance from paulproteus to do this. :)