Skip to content
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

First command wakes up bot and fails #31

Open
daniele-xp opened this issue Aug 23, 2017 · 3 comments
Open

First command wakes up bot and fails #31

daniele-xp opened this issue Aug 23, 2017 · 3 comments

Comments

@daniele-xp
Copy link
Contributor

Al primo comando lanciato della giornata, la richiesta fallisce quasi sempre a causa della lambda function di aws dormiente:

Darn - that slash command didn’t work. If you see this message more than once we suggest you contact @ettoredelprino>

Il problema è molto probabilmente quello spiegato qui: https://claudiajs.com/tutorials/slack-delayed-responses.html

La richiesta viene mandata da slack a claudiajs (che è la lambda), che però è molto più lento del solito causa wake up (i comandi successivi all'errore infatti sono veloci e non scatenano l'errore). La lambda lascia quindi in attesa slack che ha un timeout sugli slash command di (pare) 3 secondi e ritorna l'errore per mancata risposta.

In realtà, il comando che scatena l'errore, viene correttamente eseguito in asincrono (controllando infatti i track vengono eseguiti correttamente), però la risposta che viene fornita da claudiajs/lambda oramai non viene più intercettata e ritornata da slack all'utente.

Nel link di sopra vi è spiegata una possibile soluzione, ma non mi convince molto. Probabilmente è possibile impostare il timeout degli slash commands di slack; basterebbe aumentarlo di poco.

@ilbonte
Copy link
Contributor

ilbonte commented Aug 23, 2017

Dalla documentazione slack: https://api.slack.com/slash-commands#responding_to_a_command

Delayed responses and multiple responses
If you want to provide additional command response messages, or if you're unable to immediately respond to a command within 3000 milliseconds, use the specific response_url we send with our initial execution of your URL to respond to a command at your leisure. With this approach, you can respond to a user's command up to 5 times within 30 minutes of the command's invocation.

@daniele-xp
Copy link
Contributor Author

@ilbonte scoperto niente su questo? provato qualcosa?

@ilbonte
Copy link
Contributor

ilbonte commented Sep 6, 2017

Non ho investigato ulteriormente

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

No branches or pull requests

2 participants