This commit is contained in:
Dmitry Zuikov 2024-03-15 12:01:50 +03:00
parent 3cd1668451
commit 9497207115
5 changed files with 13 additions and 11 deletions

View File

@ -12,6 +12,7 @@ import HBS2.Peer.Proto.LWWRef
import HBS2.Peer.Proto.LWWRef.Internal
import HBS2.Storage
import HBS2.Net.Messaging.Unix
import HBS2.Misc.PrettyStuff
import PeerTypes
@ -49,7 +50,7 @@ instance LWWRefContext m => HandleMethod m RpcLWWRefFetch where
handleMethod key = do
co <- getRpcContext @LWWRefAPI
debug $ "rpc.LWWRefFetch" <+> pretty key
debug $ green "rpc.LWWRefFetch" <+> pretty key
let penv = rpcPeerEnv co
liftIO $ withPeerM penv $ do

View File

@ -85,7 +85,9 @@ importRepoWait lwwKey = do
IWaitLWWBlock w -> do
onProgress ip (ImportWaitLWW w lwwKey)
lww <- readLWWBlock @L4Proto sto lwwKey
debug $ yellow ("fetchLWWRef" <+> pretty lwwKey)
fetchLWWRef lwwKey
lww <- readLWWBlock sto lwwKey
case lww of
Nothing -> do

View File

@ -29,7 +29,7 @@ subscribeLWWRef puk = do
fetchLWWRef :: (GitPerks m, MonadReader GitEnv m) => LWWRefKey HBS2Basic -> m ()
fetchLWWRef key = do
api <- asks _lwwRefAPI
void $ race (pause @'Seconds 1) (callService @RpcLWWRefFetch api key)
void $ race (pause @'Seconds 2) (callService @RpcLWWRefFetch api key)
getRefLogMerkle :: (GitPerks m, MonadReader GitEnv m) => RefLogId -> m (Maybe HashRef)

View File

@ -295,17 +295,16 @@
"suckless-conf": "suckless-conf_2"
},
"locked": {
"lastModified": 1709273510,
"narHash": "sha256-wyerw00pnZq64wQGg+azHnLWzDz4C7PvBqCK3U5ejRI=",
"ref": "totally-new-download",
"rev": "a6e955aa611c3f9485976ce7eba33570a43f2eb7",
"revCount": 1036,
"lastModified": 1710431896,
"narHash": "sha256-yQ52vtX92Ys4xqsPDCIqOrR5HBVE+rJ+VagaHc9017c=",
"ref": "lwwrepo",
"rev": "3cd16684515a93bbf985891ed8e9913382484fbf",
"revCount": 981,
"type": "git",
"url": "http://git.hbs2/BTThPdHKF8XnEq4m6wzbKHKA6geLFK4ydYhBXAqBdHSP"
},
"original": {
"ref": "totally-new-download",
"rev": "a6e955aa611c3f9485976ce7eba33570a43f2eb7",
"ref": "lwwrepo",
"type": "git",
"url": "http://git.hbs2/BTThPdHKF8XnEq4m6wzbKHKA6geLFK4ydYhBXAqBdHSP"
}

View File

@ -7,7 +7,7 @@
extra-container.url = "github:erikarvstedt/extra-container";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
hbs2.url =
"git+http://git.hbs2/BTThPdHKF8XnEq4m6wzbKHKA6geLFK4ydYhBXAqBdHSP?ref=totally-new-download&rev=a6e955aa611c3f9485976ce7eba33570a43f2eb7";
"git+http://git.hbs2/BTThPdHKF8XnEq4m6wzbKHKA6geLFK4ydYhBXAqBdHSP?ref=lwwrepo";
hbs2.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";