1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 17:44:59 +09:00

Merge master

This commit is contained in:
Sergey 2022-05-24 17:41:08 +03:00
commit 14228c4efe
No known key found for this signature in database
GPG key ID: 2B848483FF11C82C
79 changed files with 124005 additions and 128950 deletions

View file

@ -47,7 +47,9 @@ var dumpTree = &cobra.Command{
dbg := app.MustComponent(debug.CName).(debug.Debug)
filename, err := dbg.DumpTree(debugThread, debugOutputFile, false)
isAnonymize := false
dumpWithSvg := false
filename, err := dbg.DumpTree(debugThread, debugOutputFile, isAnonymize, dumpWithSvg)
if err != nil {
console.Fatal("failed to dump tree: %s", err.Error())
}

View file

@ -11,7 +11,6 @@ import (
"github.com/anytypeio/go-anytype-middleware/util/pbtypes"
dsbadgerv3 "github.com/anytypeio/go-ds-badger3"
"github.com/gogo/protobuf/types"
dsbadgerv1 "github.com/ipfs/go-ds-badger"
"math/rand"
"os"
"path/filepath"
@ -67,10 +66,10 @@ func initBadgerV3(o *options) (*dsbadgerv3.Datastore, error) {
return localstoreDS, nil
}
func initBadgerV1(o *options) (*dsbadgerv1.Datastore, error) {
cfg := clientds.DefaultConfig.Logstore
func initBadgerV1(o *options) (*dsbadgerv3.Datastore, error) {
cfg := clientds.DefaultConfig.Localstore
cfg.SyncWrites = o.sync
localstoreDS, err := dsbadgerv1.NewDatastore(filepath.Join(o.path, localstoreDir), &cfg)
localstoreDS, err := dsbadgerv3.NewDatastore(filepath.Join(o.path, localstoreDir), &cfg)
if err != nil {
return nil, err
}

View file

@ -1,3 +1,4 @@
//go:build !nogrpcserver && !_test
// +build !nogrpcserver,!_test
package main
@ -45,7 +46,7 @@ func main() {
return nil
}
resp := mw.UploadFile(&pb.RpcUploadFileRequest{LocalPath: path, DisableEncryption: true})
resp := mw.FileUpload(&pb.RpcFileUploadRequest{LocalPath: path, DisableEncryption: true})
if int(resp.Error.Code) != 0 {
return fmt.Errorf(resp.Error.Description)
}

View file

@ -227,7 +227,7 @@ func main() {
case <-stopChan:
server.Stop()
proxy.Close()
mw.Shutdown(&pb.RpcShutdownRequest{})
mw.AppShutdown(&pb.RpcAppShutdownRequest{})
return
}
}