-
Notifications
You must be signed in to change notification settings - Fork 148
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
set time-to-live for webpush messages #185
Conversation
sygnal/webpushpushkin.py
Outdated
self.ttl = self.get_config("ttl") | ||
if self.ttl: | ||
if not isinstance(self.ttl, int): | ||
raise PushkinSetupException("'ttl' must be an int if set") | ||
else: | ||
self.ttl = DEFAULT_TTL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be cleaner to do this?
self.ttl = self.get_config("ttl", DEFAULT_TTL)
if not isinstance(self.ttl, int):
raise PushkinSetupException("'ttl' must be an int if set")
Do we need to document the Does |
Thanks for the review @callahad, ready for another look. |
r+ once CI passes and if you promise that you've tested this locally and it at least appears to work. |
@callahad Have tested again, all seems to work 👍 |
Configurable with a default of 15 minutes.