Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue indexer queue redis support #6218

Merged
merged 8 commits into from
Apr 8, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update required changes for new logging func signatures
  • Loading branch information
lafriks committed Apr 8, 2019
commit 1af665ed4cb59b00d0188189f5b3e7f221fefbcb
8 changes: 4 additions & 4 deletions modules/indexer/issues/queue_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (r *RedisQueue) Run() error {
for {
bs, err := r.client.LPop(r.queueName).Bytes()
if err != nil && err != redis.Nil {
log.Error(4, "LPop faile: %v", err)
log.Error("LPop faile: %v", err)
time.Sleep(time.Millisecond * 100)
continue
}
Expand All @@ -109,7 +109,7 @@ func (r *RedisQueue) Run() error {
var data IndexerData
err = json.Unmarshal(bs, &data)
if err != nil {
log.Error(4, "Unmarshal: %v", err)
log.Error("Unmarshal: %v", err)
time.Sleep(time.Millisecond * 100)
continue
}
Expand All @@ -119,11 +119,11 @@ func (r *RedisQueue) Run() error {
if data.IsDelete {
if data.ID > 0 {
if err = r.indexer.Delete(data.ID); err != nil {
log.Error(4, "indexer.Delete: %v", err)
log.Error("indexer.Delete: %v", err)
}
} else if len(data.IDs) > 0 {
if err = r.indexer.Delete(data.IDs...); err != nil {
log.Error(4, "indexer.Delete: %v", err)
log.Error("indexer.Delete: %v", err)
}
}
time.Sleep(time.Millisecond * 100)
Expand Down