Re: Best way to pause/resume ostree_pull_with_options
- From: Dan Nicholson <nicholson endlessm com>
- To: tossel gmail com
- Cc: ostree-list gnome org
- Subject: Re: Best way to pause/resume ostree_pull_with_options
- Date: Thu, 27 Sep 2018 06:24:16 -0500
On Thu, Sep 27, 2018 at 4:52 AM Anton Gerasimov via ostree-list
<ostree-list gnome org> wrote:
Greetings,
does someone here have experience/ideas about how to implement pausing and resuming pull when using OSTree
as a library?
The best thing I could come up with is cancelling the pull through GCancellable and restarting it again. Do
you think it will work? Is there a better way?
I didn't look closely, but I think this will work fine. OSTree caches
the downloaded objects, so it will continue where it left off. Our OS
updater (https://github.com/endlessm/eos-updater/) uses the
GCancellable to stop the pulling.
It's more of a cancel than a pause, though. When you restart, the
progress will be recalculated without any regards to what you did
before. On the other hand, if you're providing static deltas and the
delta download didn't complete, then I believe it starts from scratch
again.
--
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]