Skip to content

Calling ack outside of synchronous request/response? #483

@bodepd

Description

@bodepd

Hi,

I'm doing a POC to see if I can process slack events as a two step process

  1. receive events, write slack events/actions into a MQ
  2. process events out of a message queue, perform actions

I have it working (for the most part) with the two parts being:

  1. a proxy setup with a regular adapter (tested with flask and socket_mode) and an app.middleware that takes the request, writes it to the queue, then returns a BoltResponse
  2. a custom adapter - that polls for messages off the queue and converts them into BoltRequest objects

All of this is working as a POC. however, I am seeing issues with handling events/actions asynchronously, given the synchronous nature of ack during request/resp.

I can get ack working if I have my proxy (part 1 from above) return a bolt response with 200 status code and an empty body. I think this is fine for me to handle acknowledgments simply as "yes we have received and written to our queue".

However, decoupling receipt of data from slack with the data processors doesn't seem to work well for cases where you need to pass extra data to the ack method (like examples from the documentation where you pass ack(resonse_action='update').

is there a way to perform ack completely async from the request that will work both in web server and socket modes (ie: something like an ack API method that accepts a trigger-id)?

The slack_bolt version

slack-both=1.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions