]> source.dussan.org Git - gitea.git/commit
Graceful Queues: Issue Indexing and Tasks (#9363)
authorzeripath <art27@cantab.net>
Tue, 7 Jan 2020 11:23:09 +0000 (11:23 +0000)
committerAntoine GIRARD <sapk@users.noreply.github.com>
Tue, 7 Jan 2020 11:23:09 +0000 (12:23 +0100)
commit62eb1b0f2530a5ae1ce9b729378c0c8066174215
treee567b2a9d91e69c0f2bccfeaf1a7341b4dda2706
parentf71e1c8e796b099f4634bcd358e48189a97dcbad
Graceful Queues:  Issue Indexing and Tasks (#9363)

* Queue: Add generic graceful queues with settings

* Queue & Setting: Add worker pool implementation

* Queue: Add worker settings

* Queue: Make resizing worker pools

* Queue: Add name variable to queues

* Queue: Add monitoring

* Queue: Improve logging

* Issues: Gracefulise the issues indexer

Remove the old now unused specific queues

* Task: Move to generic queue and gracefulise

* Issues: Standardise the issues indexer queue settings

* Fix test

* Queue: Allow Redis to connect to unix

* Prevent deadlock during early shutdown of issue indexer

* Add MaxWorker settings to queues

* Merge branch 'master' into graceful-queues

* Update modules/indexer/issues/indexer.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update modules/indexer/issues/indexer.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update modules/queue/queue_channel.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Update modules/queue/queue_disk.go

* Update modules/queue/queue_disk_channel.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Rename queue.Description to queue.ManagedQueue as per @guillep2k

* Cancel pool workers when removed

* Remove dependency on queue from setting

* Update modules/queue/queue_redis.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* As per @guillep2k add mutex locks on shutdown/terminate

* move unlocking out of setInternal

* Add warning if number of workers < 0

* Small changes as per @guillep2k

* No redis host specified not found

* Clean up documentation for queues

* Update docs/content/doc/advanced/config-cheat-sheet.en-us.md

* Update modules/indexer/issues/indexer_test.go

* Ensure that persistable channel queue is added to manager

* Rename QUEUE_NAME REDIS_QUEUE_NAME

* Revert "Rename QUEUE_NAME REDIS_QUEUE_NAME"

This reverts commit 1f83b4fc9b9dabda186257b38c265fe7012f90df.

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
35 files changed:
custom/conf/app.ini.sample
docs/content/doc/advanced/config-cheat-sheet.en-us.md
integrations/issue_test.go
modules/indexer/issues/db.go
modules/indexer/issues/indexer.go
modules/indexer/issues/indexer_test.go
modules/indexer/issues/queue.go [deleted file]
modules/indexer/issues/queue_channel.go [deleted file]
modules/indexer/issues/queue_disk.go [deleted file]
modules/indexer/issues/queue_redis.go [deleted file]
modules/queue/manager.go [new file with mode: 0644]
modules/queue/queue.go [new file with mode: 0644]
modules/queue/queue_channel.go [new file with mode: 0644]
modules/queue/queue_channel_test.go [new file with mode: 0644]
modules/queue/queue_disk.go [new file with mode: 0644]
modules/queue/queue_disk_channel.go [new file with mode: 0644]
modules/queue/queue_disk_channel_test.go [new file with mode: 0644]
modules/queue/queue_disk_test.go [new file with mode: 0644]
modules/queue/queue_redis.go [new file with mode: 0644]
modules/queue/queue_test.go [new file with mode: 0644]
modules/queue/queue_wrapped.go [new file with mode: 0644]
modules/queue/setting.go [new file with mode: 0644]
modules/queue/workerpool.go [new file with mode: 0644]
modules/setting/queue.go [new file with mode: 0644]
modules/setting/setting.go
modules/setting/task.go
modules/task/queue.go [deleted file]
modules/task/queue_channel.go [deleted file]
modules/task/queue_redis.go [deleted file]
modules/task/task.go
options/locale/locale_en-US.ini
routers/admin/admin.go
routers/routes/routes.go
templates/admin/monitor.tmpl
templates/admin/queue.tmpl [new file with mode: 0644]