Closed salimbuet09 closed 2 years ago
O I found it, it's ttl
Can you elaborate on this TTL thing?
NVM, I also found it. It works great now!
Yeah, as a bit of clarity:
TTL
is the number of seconds that a message should stay valid. Basically "If you can't delivery it right away, hang onto it for this long". Setting a TTL:0
means "If you can't deliver this message RIGHT NOW, get rid of it."
The max TTL
you can set depends on the service you're talking to, but for most, it's about a month. Honestly? I'd probably pick something more like 24 hours (86400). Notifications are supposed to be short, timely messages. You probably don't care that you got a new email 27 days ago, or that you package arrived 2 weeks ago, neither do your recipients.
I think it's better to make this field required because the default of 0 is pretty useless in most situations.
Good news?
For most push services, the field is required. It's just that the default value is 0.
It's just that the default value is 0.
I mean in the library itself, defaulting to 0 is the same thing as not required.
Hi,
When my browser is open and I send a push, Browser receives it almost instantly (No Issue). But when Browser is closed and I send a push. After 2 minutes If I open the browser I am not receiving any push. But I should receive push. (it works fine in php-web-push, but not working in pywebpush).
requirements.txt
push.php