summaryrefslogtreecommitdiff
path: root/xmake/modules/private/service/remote_cache/server_session.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-21 10:19:55 +0800
committerruki <[email protected]>2022-05-21 10:19:55 +0800
commit946bbbfde23973d2858fc21e34bcb38c47c59b54 (patch)
treeb0958f576b077c88fd4db10d286a6558cf2e2350 /xmake/modules/private/service/remote_cache/server_session.lua
parent525f5145e9b0a1a28757bf8273b74d4caf675f57 (diff)
fix get cacheinfo
Diffstat (limited to 'xmake/modules/private/service/remote_cache/server_session.lua')
-rw-r--r--xmake/modules/private/service/remote_cache/server_session.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/modules/private/service/remote_cache/server_session.lua b/xmake/modules/private/service/remote_cache/server_session.lua
index a73734749..ee4b5b1f2 100644
--- a/xmake/modules/private/service/remote_cache/server_session.lua
+++ b/xmake/modules/private/service/remote_cache/server_session.lua
@@ -80,6 +80,7 @@ function server_session:pull(respmsg)
local stream = self:stream()
local cachekey = body.filename
local cachefile = path.join(self:cachedir(), cachekey:sub(1, 2), cachekey)
+ vprint("pull cachefile(%s) ..", cachekey)
-- send cache file
if os.isfile(cachefile) then
@@ -102,6 +103,7 @@ function server_session:push(respmsg)
local cachekey = body.filename
local cachefile = path.join(self:cachedir(), cachekey:sub(1, 2), cachekey)
local cachefile_tmp = cachefile .. ".tmp"
+ vprint("push cachefile(%s) ..", cachekey)
if not stream:recv_file(cachefile_tmp) then
os.tryrm(cachefile_tmp)
raise("recv %s failed!", cachefile)
@@ -116,6 +118,7 @@ function server_session:fileinfo(respmsg)
local cachekey = body.filename
local cachefile = path.join(self:cachedir(), cachekey:sub(1, 2), cachekey)
body.fileinfo = {filesize = os.filesize(cachefile), exists = os.isfile(cachefile)}
+ vprint("get cacheinfo(%s)", cachekey)
end
-- clean files