Skip to content

Conversation

@kamalmarhubi
Copy link
Contributor

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.

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
@kamalmarhubi kamalmarhubi marked this pull request as draft April 11, 2024 19:57
@kamalmarhubi
Copy link
Contributor Author

kamalmarhubi commented Apr 11, 2024

converted to draft; will mark it ready for review after we've run our code using the hooks for a few days to be sure these hooks are adequate

@kamalmarhubi kamalmarhubi marked this pull request as ready for review April 22, 2024 20:54
@kamalmarhubi
Copy link
Contributor Author

@Bogdanp we've been runing a cherry-pick of this onto the version we use in prod and it's allowed us to start workers in a paused state as described in the mailing list.

@Bogdanp Bogdanp merged commit 1fab55f into Bogdanp:master Apr 23, 2024
@Bogdanp
Copy link
Owner

Bogdanp commented Apr 23, 2024

Thanks!

@kamalmarhubi
Copy link
Contributor Author

@Bogdanp quick question: do you expect to make a release containing this any time soon? like I said we're running with a cherry-pick which is fine, mostly just want to have a mental note to do the upgrade if / when it's released. thanks!

@Bogdanp
Copy link
Owner

Bogdanp commented May 2, 2024

@kamalmarhubi I plan to make a release sometime next week.

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

Successfully merging this pull request may close these issues.

2 participants