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

Add Abort functionality #48

Merged
5 commits merged into from
Mar 7, 2013
Merged

Add Abort functionality #48

5 commits merged into from
Mar 7, 2013

Conversation

tannermiller-wf
Copy link
Contributor

Adding async.Abort, which is an exception that when thrown within a job
causes the job to immediately execute with only a logging message and no
callbacks executed.

Adding async.Abort, which is an exception that when thrown within a job
causes the job to immediately execute with only a logging message and no
callbacks executed.
@tannermiller-wf
Copy link
Contributor Author

@robertkluin-wf @beaulyddon-wf @ericolson-wf

@tannermiller-wf
Copy link
Contributor Author

See: #38

@@ -100,6 +100,10 @@ class AlreadyExecutingError(Exception):
"""This Async is currently executing."""


class Abort(Exception):
"""This Async needs to be aborted immediately."""
Copy link

Choose a reason for hiding this comment

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

I would add a further clause here indicating that there will be only a info level log output about the aborted task.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Tanner Miller added 4 commits February 12, 2013 09:15
Add a statement to the Abort docstr indicating that only an info level
log message will be output upon Abortion.
In the test_Abort test, I added a check to ensure that Async.start() is
not called. Also, I added checks on logging.info() and logging.error()
to ensure that info is called and error is not.
Add a logging handler to the root logger that will throw an Exception
upon receiving a log message with an Error level or greater level.
ghost pushed a commit that referenced this pull request Mar 7, 2013
@ghost ghost merged commit eea2508 into Workiva:master Mar 7, 2013
This pull request was closed.
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.

2 participants