Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Trigger error handler on DeadlineExceededError #175

Merged

Conversation

markshaule-wf
Copy link
Contributor

R: @beaulyddon-wf @macleodbroad-wf @erikpetersen-wf
O: @jasonaguilon-wf @rosshendrickson-wf @tylertreat-wf

We will now trigger the failure handler from any exception that inherits from BaseException (such as google.appengine.runtime.DeadlineExceededError) instead of Exception.

…t inherit from BaseException (such as google.appengine.runtime.DeadlineExceededError) instead of Exception
@macleodbroad-wf
Copy link

+1

1 similar comment
@erikpetersen-wf
Copy link
Member

+1

@@ -67,7 +67,7 @@ def run_job():
except AbortAndRestart as restart:
logging.info('Async job was aborted and restarted: %r', restart)
raise
except Exception as e:
except BaseException as e:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, so Google is inheriting from BaseException instead of Exception?

That's not cool. https://docs.python.org/2/library/exceptions.html#exceptions.BaseException

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should someone follow up with Google?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this followed up on and do we wish to investigate?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs show that google.appengine.runtime.DeadlineExceededError inherits from BaseException:
https://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/runtime/__init__.py

Also of note is the try/except block.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting

@beaulyddon-wf
Copy link
Contributor

+1

beaulyddon-wf added a commit that referenced this pull request Feb 5, 2016
…ling

Trigger error handler on DeadlineExceededError
@beaulyddon-wf beaulyddon-wf merged commit 4db57a9 into Workiva:master Feb 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants