Closed Bug 1822918 Opened 2 years ago Closed 2 years ago

Weather fetch can take too long to start after wake or coming online

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

RESOLVED FIXED
113 Branch
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:

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.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2144589764eb Fetch the weather suggestion after wake and coming online. r=daisuke
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Blocks: 1823080
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: