Generic helper functions for using tasks in Google App Engine