瀏覽代碼

stats for dupes

backfeed-full-error
Fusl 2 年之前
父節點
當前提交
fa467be11c
共有 1 個檔案被更改,包括 9 行新增3 行删除
  1. +9
    -3
      main.go

+ 9
- 3
main.go 查看文件

@@ -182,10 +182,16 @@ func (that *ProjectBackfeedManager) Do() {
sAddItems = append(sAddItems, items[i]) sAddItems = append(sAddItems, items[i])
} }
} }
if len(sAddItems) == 0 {
continue
dupes := wrapped - len(sAddItems)
if len(sAddItems) != 0 {
err := that.ProjectRedis.SAdd(context.Background(), fmt.Sprintf("%s:todo:backfeed", that.Name), sAddItems...).Err()
if err != nil {
log.Printf("failed to sadd items for %s: %s", that.Name, err)
}
}
if dupes > 0 {
that.BackfeedRedis.HIncrBy(context.Background(), ":", that.Name, int64(dupes))
} }
that.ProjectRedis.SAdd(context.Background(), fmt.Sprintf("%s:todo:backfeed", that.Name), sAddItems...)
} }
} }




Loading…
取消
儲存