Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rejig contexts to allow for processor and handle scoped objects #3

Closed
3 tasks done
calpaterson opened this issue Oct 19, 2020 · 0 comments
Closed
3 tasks done

Comments

@calpaterson
Copy link
Owner

calpaterson commented Oct 19, 2020

We want a way for people to scope certain things to

  • the processor's lifecycle (example: database connection pools)
  • the message's lifecycle (example: an individual database connection)

In order to do this:

  • Rename the current HandlingContext to ProcessingContext to indicate that it's per-processor
  • Create a new HandlingContext for each message
  • Create new decorator functions for them: @proc.before_process(proc_ctx) @proc.after_process(proc_ctx) @proc.before_handle(proc_ctx, handle_ctx) and @proc.after_handle(proc_ctx, handle_ctx)
calpaterson added a commit that referenced this issue Oct 24, 2020
Needs a lot more tests and error handling before it's ready

Relates to #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant