I am unable to remove certain exceptions from our logs via ndb.add_flow_exception.
class CompletedExpectedException(Exception): > """This Exception is completely expected. > We don't need to see it as "errors" in the logs, or GAE dashboard > graphs.""" > pass > # The following code, when on the 'global' app level, does not have an effect. > ndb.add_flow_exception(CompletedExpectedException) > # The following code does not work, eitherclass > WarmupHandler(webapp2.RequestHandler): > """/_ah/warmup or /_ah/start""" > def get(self): > ndb.add_flow_exception(CompletedExpectedException) > > def post(self): > self.get() > > The code above does not prevent "CompletedExpectedException" from appearing in the logs. This is primarily a problem because the only way that I know to 'fail' a deferred task is to throw an exception. (I know that I can use a direct taskqueue implementation with self.error(500) for this, but I'd still like to understand the functionality of ndb.add_flow_exception). It is documented here: https://developers.google.com/appengine/docs/python/ndb/functions As a side note - I would think this function, as documented, should belong in a different API than the datastore. *shrug* Also asked on Stack Overflow<http://stackoverflow.com/questions/23275230/reducing-log-clutter-via-ndb-add-flow-exception-with-deferred-tasks>, if you would like that sweet, sweet reputation. :P -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/d/optout.
