Lazy listeners do not work with Chalice local testing server
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia dal punto di ingresso ChaliceSlackRequestHandler e riproduci l’evento member_joined_channel con process_before_response abilitato e un lazy listener che resta in attesa per 10 secondi. Controlla il comportamento del server di test locale in relazione alla risposta /slack/events e conferma che il lazy listener termini senza BrokenPipeError dopo l’invio dell’acknowledgement.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I want to perform operations when a member has joined a channel which takes more than 5 seconds, but I'm getting BrokenPipeError: [Errno 32] Broken pipe.
The minimal step to reproduce the same has been shown below while using the lazy listener it waits for 10 seconds before responding back.
Reproducible in:
from chalice import Chalice, Response
from slack_bolt import App
from slack_bolt.adapter.aws_lambda.chalice_handler import ChaliceSlackRequestHandler
bolt_app = App(process_before_response=True)
app = Chalice(app_name='chalice_app_name')
slack_handler = ChaliceSlackRequestHandler(app=bolt_app, chalice=app)
@bolt_app.event("message")
def handle_message_events(body, logger):
logger.info(body['event']['text'])
def respond_to_slack_within_3_seconds(ack):
ack("Accepted!")
def say_it(say):
time.sleep(10)
say("Done!")
bolt_app.event("member_joined_channel")(
ack=respond_to_slack_within_3_seconds, lazy=[say_it]
)
@app.route(
"/slack/events",
methods=["POST"],
content_types=["application/x-www-form-urlencoded", "application/json"],
)
def events() -> Response:
return slack_handler.handle(app.current_request)
The slack_bolt version
slack-bolt==1.9.1
slack-sdk==3.11.1
Python runtime version
Python 3.6.15
OS info
Ubuntu 20.04.3 LTS
Steps to reproduce:
- While handling of any Slack event (e.g. handle_member_joined event)
- Use lazy listener and wait for more than 3 seconds before responding back to Slack
Expected result:
Since the event is acknowledging the Slack within 3 seconds irrespective of the lazy listener function time, it should have processed the same.
Actual result:


Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
- Lingua principale
- Python
- Stelle
- 1.3k
- Fork
- 300
- Merge medio
- 19h 33m
- PR unite (30g)
- 25
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di slackapi/bolt-python
-
`extract_team_id` crashes with `TypeError when payload["user"]` is a string (e.g. `member_joined_channel` events)Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaauto-triage-skip bug security semver:major
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
slackapi/bolt-python#1447 · 9 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
auto-triage-stale
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
slackapi/bolt-python#1599 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Error handlers that take args: Args crash with a missing 'next' argumentForse già presa @sahiljagtap08 l’ha presa 42 giorni fa. Apertaauto-triage-stale
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
slackapi/bolt-python#1598 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Assistant listener middleware crashes when given a plain functionForse già presa @sahiljagtap08 l’ha presa 42 giorni fa. Apertaauto-triage-stale
Difficoltà 2/5 1-3 ore Idoneità per principianti 30/100
slackapi/bolt-python#1597 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
AsyncOAuthFlow raises UnboundLocalError on org-wide install without a bot tokenForse già presa @sahiljagtap08 l’ha presa 42 giorni fa. Apertaauto-triage-stale
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
slackapi/bolt-python#1596 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di slackapi/bolt-python
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
trycua/hermes-cua-spaces#17 ·
-
area:codegen backend:hip bug direction:output good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
status:waiting-for-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
microsoftgraph/msgraph-sdk-python#1628 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
nautechsystems/nautilus_trader#5718 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: reme CLI crashes when the running server used a relative config pathForse già presa @nurlanmnn l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
agentscope-ai/ReMe#770 ·
I maintainer di solito rispondono entro 1 giorno