forgejo/modules/queue
Giteabot 13f304d89e
Properly flush unique queues on startup (#23154) (#23200)
Backport #23154

There have been a number of reports of PRs being blocked whilst being
checked which have been difficult to debug. In investigating #23050 I
have realised that whilst the Warn there is somewhat of a miscall there
was a real bug in the way that the LevelUniqueQueue was being restored
on start-up of the PersistableChannelUniqueQueue.

Next there is a conflict in the setting of the internal leveldb queue
name - This wasn't being set so it was being overridden by other unique
queues.

This PR fixes these bugs and adds a testcase.

Thanks to @brechtvl  for noticing the second issue.

Fix #23050
and others

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: delvh <leon@kske.dev>
2023-03-06 22:34:54 +08:00
..
bytefifo.go
helper.go Add more linters to improve code readability (#19989) 2022-06-20 12:02:49 +02:00
manager.go
queue.go
queue_bytefifo.go Add more linters to improve code readability (#19989) 2022-06-20 12:02:49 +02:00
queue_channel.go Properly flush unique queues on startup (#23154) (#23200) 2023-03-06 22:34:54 +08:00
queue_channel_test.go
queue_disk.go
queue_disk_channel.go Properly flush unique queues on startup (#23154) (#23200) 2023-03-06 22:34:54 +08:00
queue_disk_channel_test.go Properly flush unique queues on startup (#23154) (#23200) 2023-03-06 22:34:54 +08:00
queue_disk_test.go test: use T.TempDir to create temporary test directory (#21043) 2022-09-04 16:14:53 +01:00
queue_redis.go
queue_test.go
queue_wrapped.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
setting.go
unique_queue.go
unique_queue_channel.go Properly flush unique queues on startup (#23154) (#23200) 2023-03-06 22:34:54 +08:00
unique_queue_channel_test.go Properly flush unique queues on startup (#23154) (#23200) 2023-03-06 22:34:54 +08:00
unique_queue_disk.go
unique_queue_disk_channel.go Properly flush unique queues on startup (#23154) (#23200) 2023-03-06 22:34:54 +08:00
unique_queue_disk_channel_test.go Properly flush unique queues on startup (#23154) (#23200) 2023-03-06 22:34:54 +08:00
unique_queue_redis.go
unique_queue_wrapped.go
workerpool.go Correctly handle select on multiple channels in Queues (#22146) (#22428) 2023-01-13 20:42:42 +00:00