Weather fetch can take too long to start after wake or coming online
Categories
(Firefox :: Address Bar, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: adw, Assigned: adw)
References
Details
Attachments
(1 file)
Currently the weather suggestion is fetched on a 30-minute timer. The timer stops ticking while the computer is asleep, so if you put your computer to sleep at night and wake it in the morning, it can take up to 30 minutes for the suggestion from the previous night to be refreshed. Similarly, if you're offline and you come online, it can take the full refresh period for the suggestion to be fetched again.
Sync faces this same problem, so we can take inspiration from it. It listens for the following observer service notifications and schedules new syncs as necessary:
wake_notification
network:link-status-changed
- This is sent when the user's network status changesnetwork:offline-status-changed
- This is sent when the user toggles the "Work Offline" prefcaptive-portal-login-success
Assignee | ||
Comment 1•2 years ago
|
||
This listens for some observer service notifications so we can re-fetch the
weather suggestion after wake and coming online, without having to wait for the
timer to fire. Please see the bug for background.
I changed the interval (repeating timer) to a timeout (non-repeating timer)
since the timer needs to be recreated on wake if the wake happens before the
start of the next fetch period.
Comment 3•2 years ago
|
||
bugherder |
Description
•