Comments (5)
Hi @PrajwalNaik07 thank fro writing in
You should be able to accomplish this by starting multiple python
processes that execute your application source code
For example run python app.py
in 2 separate terminals each process will open a WebSocket connections.
from bolt-python.
Hi @WilliamBergamin ,
I tried the above approach, and it significantly reduces my issues, but in one instance saw that a particular event was triggered in one of the replica pods but the socket mode got reconnected in between the process execution resulting in failure of the process, could you tell me how to avoid this even thought I am running multiple pods for my app
from bolt-python.
As long as you keep at least one connection alive all the time, terminating others does not matter. Slack's API server delivers to any of the active connections and does retries for Events API messages. If you terminate all the instances at a time, indeed the situation your app may miss some events may arise.
from bolt-python.
Hi @seratch ,
So we are running two pods for the app socket mode, and they are handling all the requests but in my case I have added a button in the app and when the user clicks the button I start a particular function. I have logged when the process starts, and when checked the pods it seems like the process started but before completion of the process the socket mode got reconnected loosing to complete the function, so according the socket mode the request was received but before completion the socket mode got re-established resulting in failure of process and giving the fallback output. How do I handle this
from bolt-python.
I appreciate your clarification on the matter.
Indeed, with Socket Mode, there could be a risk of the event handling failure like you described. Unfortunately, there's no perfect solution to completely avoid this potential issue with Socket Mode. The connection can be re-establihed upon a request from Slack server or due to a network error.
If clicking the button again isn't acceptable for your app's operational need, an alternative approach would be to run your Slack app instances behind a publicly accesible "Request URL" instead, plus to implement a graceful shutdown process for running bolt-python instances. This will help prevent the loss of any events being processed.
I understand this could be frustrating for your need, but I hope this was helpful to you.
from bolt-python.
Related Issues (20)
- 10MB limit in file input block element HOT 7
- Email verified field for user HOT 5
- Slack_bolt sends 200 to failed events HOT 4
- Message event is able to read personal messages sent to/recieved from other users in same workspace from installed app. HOT 9
- views_update not updating initial_value of text area when initial_value was set while generating the initial view HOT 4
- Store Installation data in respective Slack org's Infrastructure HOT 8
- Invalid request signature detected when running a bot inside a container HOT 2
- MultiTeamsAuthorization error HOT 3
- @app_mention event is not being triggered sometimes HOT 3
- Customize user-facing message sent when an installation is not managed by bolt-python app HOT 1
- Slack API revokes an access token after some time when running the code in Lambda HOT 4
- Bolt Slack API is very unclear on multiple workspace install HOT 5
- enable_token_revocation_listeners() is not invoking unistallation method of a custom installation store HOT 2
- [Question] Is there a way to specify the default tab for an app HOT 3
- Allow for the "confirm" field within the Overflow menu element to be used on a per-item basis HOT 2
- Redirect after Request to Install submission for Slack App HOT 1
- Message Event: how to distinguish messages sent to bot DM's as oppose to DM's between users. HOT 1
- How to send data for external_select where it takes more time to fetch the data? HOT 3
- How does `bolt-python` rotate tokens? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolt-python.