Skip to content

Commit

Permalink
exec task add sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
kaki-admin committed Apr 28, 2024
1 parent 66a59e6 commit ccfe767
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions prerank-stages/extractor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func main() {
common.Logger.Info("get unextract data ", zap.Int("page", i))
extractData = api.GetUnextractedData(limit)
}
time.Sleep(time.Second * 5)
}
}
api.SetRedisConfig(source, "last_extractor_time", startTimestamp)
Expand Down
1 change: 1 addition & 0 deletions prerank-stages/prerank/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func entriesSaveToMongo(currentList []*model.EntryModel) {
if len(addList) >= 100 {
api.AddEntriesInMongo(addList)
addList = make([]*model.EntryModel, 0)
time.Sleep(time.Second * 5)
}
} else {
delete(existEntriesMap, currentEntry.Url)
Expand Down

0 comments on commit ccfe767

Please sign in to comment.