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

Fix: expiration ttl as timedelta on gcpubsub #2240

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion kombu/transport/gcpubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from concurrent.futures import (FIRST_COMPLETED, Future, ThreadPoolExecutor,
wait)
from contextlib import suppress
from datetime import timedelta
from os import getpid
from queue import Empty
from threading import Lock
Expand Down Expand Up @@ -318,7 +319,7 @@ def _create_subscription(
"topic": topic_path,
'ack_deadline_seconds': self.ack_deadline_seconds,
'expiration_policy': {
'ttl': f'{self.expiration_seconds}s'
'ttl': timedelta(seconds=self.expiration_seconds)
},
'message_retention_duration': f'{msg_retention}s',
**(filter_args or {}),
Expand Down
Loading