Debug rebuild
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Arnas Udovic 2023-06-29 15:33:25 +03:00
parent 760753c7b8
commit 46e00f5521
2 changed files with 6 additions and 0 deletions

View file

@ -2,13 +2,18 @@ package main
import ( import (
zord_tree "g.arns.lt/zordsdavini/zord-tree" zord_tree "g.arns.lt/zordsdavini/zord-tree"
"log"
"os" "os"
) )
func Collect() { func Collect() {
log.Println("Collect: start")
if _, err := os.Stat(source); os.IsNotExist(err) { if _, err := os.Stat(source); os.IsNotExist(err) {
log.Print(err)
panic("Source directory does not exist.") panic("Source directory does not exist.")
} }
log.Println("Collect: pre")
_ = zord_tree.PopulateTree(source, meta, customMeta) _ = zord_tree.PopulateTree(source, meta, customMeta)
log.Println("Collect: post")
} }

View file

@ -67,6 +67,7 @@ func (TreeManagerServer *server) GetFile(_ context.Context, in *FileRequest) (*F
} }
func (TreeManagerServer *server) RebuildTree(ctx context.Context, in *TreeSecret) (*RebuildResponse, error) { func (TreeManagerServer *server) RebuildTree(ctx context.Context, in *TreeSecret) (*RebuildResponse, error) {
log.Println(in)
success := false success := false
if in.Key == key { if in.Key == key {
Collect() Collect()