From 6fe8561a6be650a3cee5e8a6be84f38aea3ddc10 Mon Sep 17 00:00:00 2001 From: Erik Winter Date: Tue, 29 Oct 2024 07:12:40 +0100 Subject: [PATCH] deploy and sync fix --- Makefile | 2 ++ plan/command/sync.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 84a0fb9..2f9c7ef 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +plan-deploy: + cd plan && go build -o plan . && mv plan ~/bin sync-run: cd sync/service && go run . -dbname localhost -dbport 5432 -dbname planner -dbuser test -dbpassword test -port 8092 -key testKey diff --git a/plan/command/sync.go b/plan/command/sync.go index a8922e7..178f499 100644 --- a/plan/command/sync.go +++ b/plan/command/sync.go @@ -56,7 +56,7 @@ func Sync(client client.Client, syncRepo storage.Sync, localIDRepo storage.Local updated := make([]item.Item, 0) for _, ri := range recItems { if ri.Deleted { - if err := localIDRepo.Delete(ri.ID); err != nil { + if err := localIDRepo.Delete(ri.ID); err != nil && !errors.Is(err, storage.ErrNotFound) { return fmt.Errorf("could not delete local id: %v", err) } if err := eventRepo.Delete(ri.ID); err != nil && !errors.Is(err, storage.ErrNotFound) {