rele icon indicating copy to clipboard operation
rele copied to clipboard

Customize the ack deadline parameter of a single subscription

Open daniel-ruiz opened this issue 5 years ago • 0 comments

We previously created an issue (#44 ) that introduces a new setting value which overrides the default ack deadline of a PubSub subscription. However, that configuration applies to all subscriptions in the same way and we might have certain subscriptions that need a different value.

In order to solve that problem, we propose to add a new parameter to the sub decorator (which is the one in charge of creating subscriptions) that tweaks the ack deadline. For instance:

# subs.py
@sub('new_blog_entry', ack_deadline=180)
def my_very_expensive_callback():
    ...

In the last example, ack_deadline is the number of seconds set to the ack deadline of the subscription.

daniel-ruiz avatar Jun 13 '19 13:06 daniel-ruiz