-
Notifications
You must be signed in to change notification settings - Fork 536
Closed
Description
As of PR #2301 we've seen about 2.4 million requests (in 4 days) checking for updates.
Which you can check now too on the new Cloud Insights page 📊
I believe the cause is the 5 second interval for checking for updates.
hyprnote/plugins/updater2/src/lib.rs
Lines 39 to 44 in 8dc50b9
| tauri::async_runtime::spawn(async move { | |
| loop { | |
| tokio::time::sleep(std::time::Duration::from_secs(5)).await; | |
| job::check_and_download_update(&handle).await; | |
| } | |
| }); |
I'd suggest slowing this interval down substantially.
For example, on app startup + every 1 hour.
tauri::async_runtime::spawn(async move {
loop {
- tokio::time::sleep(std::time::Duration::from_secs(5)).await;
job::check_and_download_update(&handle).await;
+ tokio::time::sleep(std::time::Duration::from_secs(3600)).await;
}
});Some back of the envelope math.
| Interval | 5 sec | 15 min | 1 hour |
|---|---|---|---|
| Requests in 30 days x 100 users |
51.8M | 288k | 72k |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done