Move ndb tasklet from api into model as it is used from the main app as well as the api now