deploy and sync fix

This commit is contained in:
Erik Winter 2024-10-29 07:12:40 +01:00
parent bb522038f9
commit 6fe8561a6b
2 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,5 @@
plan-deploy:
cd plan && go build -o plan . && mv plan ~/bin
sync-run: sync-run:
cd sync/service && go run . -dbname localhost -dbport 5432 -dbname planner -dbuser test -dbpassword test -port 8092 -key testKey cd sync/service && go run . -dbname localhost -dbport 5432 -dbname planner -dbuser test -dbpassword test -port 8092 -key testKey

View File

@ -56,7 +56,7 @@ func Sync(client client.Client, syncRepo storage.Sync, localIDRepo storage.Local
updated := make([]item.Item, 0) updated := make([]item.Item, 0)
for _, ri := range recItems { for _, ri := range recItems {
if ri.Deleted { 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) return fmt.Errorf("could not delete local id: %v", err)
} }
if err := eventRepo.Delete(ri.ID); err != nil && !errors.Is(err, storage.ErrNotFound) { if err := eventRepo.Delete(ri.ID); err != nil && !errors.Is(err, storage.ErrNotFound) {