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
Allow a custom Executor in App #453
Conversation
It's not *required* that the executor be a ThreadPoolExecutor -- any thread-based executor meeting the Executor interface would work. We can weaken the type annotation to allow custom executors.
270ed3c
to
14d56bc
Compare
I think this is ready for review. One thing I'm unsure of is whether I should update the API documentation. I did update the docstring on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @chrisbouchard, thanks for following up with a pull request! You're awesome 🎉
The CLA looks good and I've enabled the test workflow to run. ✅
I'll let @seratch review your pull request and comment on why generating the documentation changes more files than expected. Regardless, thanks a lot for taking the extra steps to add test and update the docs 🤘🏻
Codecov Report
@@ Coverage Diff @@
## main #453 +/- ##
=======================================
Coverage 91.34% 91.35%
=======================================
Files 167 167
Lines 5501 5503 +2
=======================================
+ Hits 5025 5027 +2
Misses 476 476
Continue to review full report at Codecov.
|
I was able to figure out the issue with docs. It looks like a new version of pydoc has been published (0.10.0) that causes content and formatting changes in around 171 doc files. I fixed my pydoc version to 0.9.2 to match what's currently checked into main and I got a much more reasonable diff. |
@chrisbouchard Thanks for updating the docs but can you revert the change? We usually update the API docs after releasing a version. |
Since it will be used by pydoc to generate the docs, we should use markdown for formatting.
66b0dd1
to
8f27e9d
Compare
Improved wording for documentation around the new `listener_executor` parameter. Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
Doc changes reverted, and wording suggestions applied. 👍 |
Thanks for working on this! LGTM |
This pull request adds a
listener_executor
keyword parameter toApp.__init__
, so that the executor for running background listener functions can be customized by the user. It also weakens the type requirement for executors to justconcurrent.futures.Executor
, the abstract base class of executors.Fixes #452.
Category (place an
x
in each of the[ ]
)slack_bolt.App
and/or its core componentsslack_bolt.async_app.AsyncApp
and/or its core componentsslack_bolt.adapter
/docs
Requirements (place an
x
in each[ ]
)Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
./scripts/install_all_and_run_tests.sh
after making the changes.