mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 14:45:25 +03:00
Change ttl dynamically
This commit is contained in:
parent
9d8104618e
commit
4808a7d7fd
@ -152,11 +152,12 @@ class WebPushClient(Communicator): # type: ignore[misc]
|
|||||||
endpoint[0 : endpoint.index("/", 10)]
|
endpoint[0 : endpoint.index("/", 10)]
|
||||||
].copy()
|
].copy()
|
||||||
headers["urgency"] = "high"
|
headers["urgency"] = "high"
|
||||||
|
ttl = 3600 if state == "end" else 0
|
||||||
|
|
||||||
# send message
|
# send message
|
||||||
resp = pusher.send(
|
resp = pusher.send(
|
||||||
headers=headers,
|
headers=headers,
|
||||||
ttl=3600,
|
ttl=ttl,
|
||||||
data=json.dumps(
|
data=json.dumps(
|
||||||
{
|
{
|
||||||
"title": title,
|
"title": title,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user