Browse Source

don't enter retry loop in case sAddItems is empty

master
Fusl 11 months ago
parent
commit
82fb732fc4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      projectbackfeedmanager.go

+ 2
- 2
projectbackfeedmanager.go View File

@@ -162,8 +162,8 @@ func (that *ProjectBackfeedManager) Do() {
}
dupes := wrapped - len(sAddItems)
try = 0
for {
if len(sAddItems) != 0 {
if len(sAddItems) != 0 {
for {
if err := that.ProjectRedis.SAdd(context.Background(), fmt.Sprintf("%s:todo:backfeed", that.Name), sAddItems...).Err(); err != nil {
log.Printf("failed to sadd items for %s: %s", that.Name, err)
time.Sleep(time.Duration(try) * time.Second)


Loading…
Cancel
Save