mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-16 23:12:43 +00:00
Add golangci (#6418)
This commit is contained in:
parent
5832f8d90d
commit
f9ec2f89f2
147 changed files with 1046 additions and 774 deletions
|
@ -34,20 +34,20 @@ func (c *ChannelQueue) Run() error {
|
|||
select {
|
||||
case data := <-c.queue:
|
||||
if data.IsDelete {
|
||||
c.indexer.Delete(data.IDs...)
|
||||
_ = c.indexer.Delete(data.IDs...)
|
||||
continue
|
||||
}
|
||||
|
||||
datas = append(datas, data)
|
||||
if len(datas) >= c.batchNumber {
|
||||
c.indexer.Index(datas)
|
||||
_ = c.indexer.Index(datas)
|
||||
// TODO: save the point
|
||||
datas = make([]*IndexerData, 0, c.batchNumber)
|
||||
}
|
||||
case <-time.After(time.Millisecond * 100):
|
||||
i++
|
||||
if i >= 3 && len(datas) > 0 {
|
||||
c.indexer.Index(datas)
|
||||
_ = c.indexer.Index(datas)
|
||||
// TODO: save the point
|
||||
datas = make([]*IndexerData, 0, c.batchNumber)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue