Manage PackageKit database refresh
ClosedPublic

Authored by apol on Nov 21 2016, 2:54 PM.

Details

Summary

Refresh the packagekit database every day and 5 minutes after starting
the notifier

Diff Detail

Repository
R134 Discover Software Store
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol updated this revision to Diff 8344.Nov 21 2016, 2:54 PM
apol retitled this revision from to Manage PackageKit database refresh.
apol updated this object.
apol edited the test plan for this revision. (Show Details)
apol added a reviewer: sitter.
sitter accepted this revision.Nov 21 2016, 2:57 PM
sitter edited edge metadata.

lgtm

This revision is now accepted and ready to land.Nov 21 2016, 2:57 PM
This revision was automatically updated to reflect the committed changes.
mak added a subscriber: mak.Nov 21 2016, 8:06 PM
mak added inline comments.
libdiscover/backends/PackageKitBackend/PackageKitNotifier.cpp
33

This is likely not doing what you think it does...
The daemon is started on-demand when you make a call on the PackageKit interface, and auto-quits after it has been idle for a while.
So, the code below this will only be triggered if the daemon happens to be running as per request of another tool or query.

Anyway, no issue in this patch though.

sitter added inline comments.Nov 22 2016, 12:00 PM
libdiscover/backends/PackageKitBackend/PackageKitNotifier.cpp
33

Given the new refreshDatabase calls recheckSystemUpdateNeeded based on a signal out of the daemon it should be fine. But yeah, this if block can go entirely given this new behavior. Additionally the same isRunning guard probably should be dropped from recheckSystemUpdateNeeded as it is fairly useless there.