mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 06:35:24 +03:00
Fix firefox pushes
This commit is contained in:
parent
fd0a9b3e5d
commit
710ab1ea58
@ -23,7 +23,7 @@ class WebPushClient(Communicator): # type: ignore[misc]
|
|||||||
def __init__(self, config: FrigateConfig) -> None:
|
def __init__(self, config: FrigateConfig) -> None:
|
||||||
self.config = config
|
self.config = config
|
||||||
self.claim_headers: dict[str, dict[str, str]] = {}
|
self.claim_headers: dict[str, dict[str, str]] = {}
|
||||||
self.refresh = 0
|
self.refresh: int = 0
|
||||||
self.web_pushers: dict[str, list[WebPusher]] = {}
|
self.web_pushers: dict[str, list[WebPusher]] = {}
|
||||||
self.expired_subs: dict[str, list[str]] = {}
|
self.expired_subs: dict[str, list[str]] = {}
|
||||||
|
|
||||||
@ -49,9 +49,9 @@ class WebPushClient(Communicator): # type: ignore[misc]
|
|||||||
# check for valid claim or create new one
|
# check for valid claim or create new one
|
||||||
now = datetime.datetime.now().timestamp()
|
now = datetime.datetime.now().timestamp()
|
||||||
if len(self.claim_headers) == 0 or self.refresh < now:
|
if len(self.claim_headers) == 0 or self.refresh < now:
|
||||||
self.refresh = (
|
self.refresh = int(
|
||||||
datetime.datetime.now() + datetime.timedelta(hours=1)
|
(datetime.datetime.now() + datetime.timedelta(hours=1)).timestamp()
|
||||||
).timestamp()
|
)
|
||||||
endpoints: set[str] = set()
|
endpoints: set[str] = set()
|
||||||
|
|
||||||
# get a unique set of push endpoints
|
# get a unique set of push endpoints
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user