pull: Prioritize fetching metadata objects over content objects
This commit is contained in:
1 parent
5c26e392ec
commit
4b5b450d5c
1 file changed
+5
-1
@@ -29,6 +29,9 @@
|
|||||||
#include "ostree-metalink.h"
|
#include "ostree-metalink.h"
|
||||||
#include "otutil.h"
|
#include "otutil.h"
|
||||||
|
|
||||||
|
#define OSTREE_REPO_PULL_CONTENT_PRIORITY (OSTREE_FETCHER_DEFAULT_PRIORITY)
|
||||||
|
#define OSTREE_REPO_PULL_METADATA_PRIORITY (OSTREE_REPO_PULL_CONTENT_PRIORITY - 100)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
OstreeRepo *repo;
|
OstreeRepo *repo;
|
||||||
OstreeRepoPullFlags flags;
|
OstreeRepoPullFlags flags;
|
||||||
@@ -1123,7 +1126,8 @@ enqueue_one_object_request (OtPullData *pull_data,
|
|||||||
|
|
||||||
_ostree_fetcher_request_uri_with_partial_async (pull_data->fetcher, obj_uri,
|
_ostree_fetcher_request_uri_with_partial_async (pull_data->fetcher, obj_uri,
|
||||||
expected_max_size,
|
expected_max_size,
|
||||||
OSTREE_FETCHER_DEFAULT_PRIORITY,
|
is_meta ? OSTREE_REPO_PULL_METADATA_PRIORITY
|
||||||
|
: OSTREE_REPO_PULL_CONTENT_PRIORITY,
|
||||||
pull_data->cancellable,
|
pull_data->cancellable,
|
||||||
is_meta ? meta_fetch_on_complete : content_fetch_on_complete, fetch_data);
|
is_meta ? meta_fetch_on_complete : content_fetch_on_complete, fetch_data);
|
||||||
soup_uri_free (obj_uri);
|
soup_uri_free (obj_uri);
|
||||||
|
|||||||
Reference in new issue
Block a user