forked from Bogdanp/dramatiq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add middleware after_{consumer,worker}_thread_boot hooks
This allows the middleware to run code in the context of a worker or consumer thread before it enters its run loop. This could be used to set up thread-local resources, or as in the author's case, to get a reference to the thread before it does any work. This was proposed on the mailing list [0] with Bogdan accepting the idea in principle [1]. [0]: https://groups.io/g/dramatiq-users/topic/105311701 [1]: https://groups.io/g/dramatiq-users/topic/105311701#258
- Loading branch information
1 parent
76578a6
commit 5000370
Showing
2 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters