Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add periodic automatic diagnosis key download #78

Closed
llewelld opened this issue Jan 2, 2021 · 5 comments
Closed

Add periodic automatic diagnosis key download #78

llewelld opened this issue Jan 2, 2021 · 5 comments

Comments

@llewelld
Copy link
Owner

llewelld commented Jan 2, 2021

As a user, I'd like diagnosis keys to be downloaded automatically every day, so that I don't have to remember to do it myself.

Currently the user has to trigger a download of the diagnosis keys every day. A configuration option should be added to automatically trigger a download of the keys daily at a time set by the user.

@llewelld
Copy link
Owner Author

llewelld commented Jan 2, 2021

Ideally the download should run even if the app isn't running, but in practice it doesn't make sense architecturally to add this functionality to the daemon (it's not GAEN functionality), and so it'll be easier to just require the app to be running, rather than creating a whole new separate daemon for the process.

@llewelld
Copy link
Owner Author

llewelld commented Jan 3, 2021

Draft PR to add support for this: #81.

@dimpflmoser
Copy link

Would it be an option to have a systemd timer that triggers once a day to check if the app is running. If not it could launch the app. The app could terminate itself after the key update if it has been launched by systemd.

@llewelld
Copy link
Owner Author

llewelld commented Feb 7, 2021

I was originally planning to use timed for this, but a bug in timed (requesting timed to call a dbus method is broken at the moment) prevented it from working. I submitted a PR to fix timed here: https://git.sailfishos.org/mer-core/timed/merge_requests/25

However, @spiiroin (main timed dev) suggested it's probably better for this functionality to be dropped from timed entirely, and to use nemo-qml-plugins-keepalive instead, so I'll look into that.

@llewelld
Copy link
Owner Author

MR #81 introduces this feature, so you can set keys to download every day at a particular time. At the moment the app has to be running for the download to take place.

@dimpflmoser: I like your idea, but I'm going to close this now and have created the separate task #94 to have the trigger work even if the app is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants