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

Async subclasses can now decorate their target functions #173

Merged
merged 1 commit into from
Nov 13, 2015

Conversation

jasonaguilon-wf
Copy link
Contributor

There's a couple reasons you'd want to leverage this:

  1. Instead of decorating every target function's definition, just use the
    appropriate Async type.
  2. When you only want the decorated function for tasks.

Examples of the latter, where you'd want extra functionality for the Task but
not when using the target function as a normal local procedure call, would be:

  • logging out extra context for the task
  • top-level try/except handling for the task
  • a retry loop, instead of just kicking off a new task when a transient error
    happens

@markshaule-wf @andreleblanc-wf @beaulyddon-wf @tylertreat

FYI @macleodbroad-wf

There's a couple reasons you'd want to leverage this:
1. Instead of decorating every target function's definition, just use the
   appropriate Async type.
2. When you only want the decorated function for tasks.

Examples of the latter, where you'd want extra functionality for the Task but
not when using the target function as a normal local procedure call, would be:
- logging out extra context for the task
- top-level try/except handling for the task
- a retry loop, instead of just kicking off a new task when a transient error
  happens
@andreleblanc-wf
Copy link
Contributor

+1 very nice

@beaulyddon-wf
Copy link
Contributor

lgtm

Any additional testing been done on this?

@jasonaguilon-wf
Copy link
Contributor Author

@beaulyddon-wf I installed this branch on a local dev server as well as appspot. The Async tasks ran as expected and no errors logged.

@markshaule-wf
Copy link
Contributor

+1

beaulyddon-wf added a commit that referenced this pull request Nov 13, 2015
Async subclasses can now decorate their target functions
@beaulyddon-wf beaulyddon-wf merged commit c03bb74 into Workiva:master Nov 13, 2015
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

4 participants