From fd73c1e20a7aaefcb69db3e6b2f081e1a5e20406 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 31 Aug 2017 15:25:58 +0200 Subject: Add an activity for binary cache queries --- src/libstore/binary-cache-store.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libstore/binary-cache-store.cc') diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index 403b468728..556fa3d593 100644 --- a/src/libstore/binary-cache-store.cc +++ b/src/libstore/binary-cache-store.cc @@ -313,6 +313,11 @@ void BinaryCacheStore::queryPathInfoUncached(const Path & storePath, std::function)> success, std::function failure) { + auto uri = getUri(); + auto act = std::make_shared(*logger, lvlTalkative, actQueryPathInfo, + fmt("querying info about '%s' on '%s'", storePath, uri), Logger::Fields{storePath, uri}); + PushActivity pact(act->id); + auto narInfoFile = narInfoFileFor(storePath); getFile(narInfoFile, @@ -323,6 +328,8 @@ void BinaryCacheStore::queryPathInfoUncached(const Path & storePath, callSuccess(success, failure, (std::shared_ptr) std::make_shared(*this, *data, narInfoFile)); + + (void) act; // force Activity into this lambda to ensure it stays alive }, failure); } -- cgit 1.4.1