Commit c31f442a authored by acud's avatar acud Committed by GitHub

fix(pusher): dont increment missing tags (#2081)

parent 3eae0187
...@@ -206,7 +206,10 @@ LOOP: ...@@ -206,7 +206,10 @@ LOOP:
err = fmt.Errorf("pusher: set sync: %w", err) err = fmt.Errorf("pusher: set sync: %w", err)
return return
} }
if ch.TagID() > 0 {
// for individual chunks uploaded using the
// /chunks api endpoint the tag will be missing
// by default, unless the api consumer specifies one
t, err = s.tag.Get(ch.TagID()) t, err = s.tag.Get(ch.TagID())
if err == nil && t != nil { if err == nil && t != nil {
err = t.Inc(tags.StateSynced) err = t.Inc(tags.StateSynced)
...@@ -222,6 +225,8 @@ LOOP: ...@@ -222,6 +225,8 @@ LOOP:
} }
} }
} }
}
}(ctx, ch) }(ctx, ch)
case <-timer.C: case <-timer.C:
// initially timer is set to go off as well as every time we hit the end of push index // initially timer is set to go off as well as every time we hit the end of push index
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment