You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules/queue
zeripath 36c66303df
Only attempt to flush queue if the underlying worker pool is not finished (#18593) (#18620)
* Only attempt to flush queue if the underlying worker pool is not finished (#18593)

Backport #18593

There is a possible race whereby a worker pool could be cancelled but yet the
underlying queue is not empty. This will lead to flush-all cycling because it
cannot empty the pool.

* On shutdown of Persistant Channel Queues close datachan and empty

Partial Backport #18415

Although we attempt to empty the datachan in queues - due to
races we are better off just closing the channel and forcibly emptying
it in shutdown.

Fix #18618

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Move zero workers warning to debug

Fix #18617

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update modules/queue/manager.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>

* Update modules/queue/manager.go

Co-authored-by: Gusted <williamzijl7@hotmail.com>

Co-authored-by: Gusted <williamzijl7@hotmail.com>
3 years ago
..
bytefifo.go Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) 4 years ago
helper.go Add an abstract json layout to make it's easier to change json library (#16528) 4 years ago
manager.go Only attempt to flush queue if the underlying worker pool is not finished (#18593) (#18620) 3 years ago
queue.go Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) 4 years ago
queue_bytefifo.go Add an abstract json layout to make it's easier to change json library (#16528) 4 years ago
queue_channel.go Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) 4 years ago
queue_channel_test.go Fixed assert statements. (#16089) 4 years ago
queue_disk.go Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) 4 years ago
queue_disk_channel.go Only attempt to flush queue if the underlying worker pool is not finished (#18593) (#18620) 3 years ago
queue_disk_channel_test.go Prevent deadlock in TestPersistableChannelQueue (#17717) 3 years ago
queue_disk_test.go A better go code formatter, and now `make fmt` can run in Windows (#17684) 3 years ago
queue_redis.go Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) 4 years ago
queue_test.go Add an abstract json layout to make it's easier to change json library (#16528) 4 years ago
queue_wrapped.go Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) 4 years ago
setting.go Use immediate queues in integration tests and ensure that immediate (#16927) 4 years ago
unique_queue.go Add Unique Queue infrastructure and move TestPullRequests to this (#9856) 5 years ago
unique_queue_channel.go Make the Mirror Queue a queue (#17326) 3 years ago
unique_queue_disk.go Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) 4 years ago
unique_queue_disk_channel.go Fix panic (#16072) 4 years ago
unique_queue_redis.go Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) 4 years ago
unique_queue_wrapped.go Add Unique Queue infrastructure and move TestPullRequests to this (#9856) 5 years ago
workerpool.go Only attempt to flush queue if the underlying worker pool is not finished (#18593) (#18620) 3 years ago