sym.sdk.integrations.slack.fallback

sym.sdk.integrations.slack.fallback(*destinations: sym.sdk.request_destination.RequestDestination, continue_on_delivery_failure: Optional[bool] = True, continue_on_timeout: Optional[bool] = False) sym.sdk.request_destination.RequestDestinationFallback

Returns a RequestDestinationFallback that contains the specified RequestDestination objects, with continue_on_delivery_failure=True.

If used as the return value of a get_approvers reducer, when a Sym Request is made, each RequestDestination will be attempted in sequence until one succeeds.

For example:

def get_approvers(event):
    return slack.fallback(slack.channel("#missing"), slack.user("@david"))
Parameters
  • destinations – At least 2 RequestDestination objects.

  • continue_on_delivery_failure – A boolean representing whether to deliver to the next destination if a failure occurs while delivering to the current destination.

  • continue_on_timeout – A boolean representing whether to deliver to the next destination if the Request at the current destination times out.