1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-03 01:45:47 +00:00
gitea/routers/web/admin
wxiaoguang 18f26cfbf7
Improve queue and logger context (#24924)
Before there was a "graceful function": RunWithShutdownFns, it's mainly
for some modules which doesn't support context.

The old queue system doesn't work well with context, so the old queues
need it.

After the queue refactoring, the new queue works with context well, so,
use Golang context as much as possible, the `RunWithShutdownFns` could
be removed (replaced by RunWithCancel for context cancel mechanism), the
related code could be simplified.

This PR also fixes some legacy queue-init problems, eg:

* typo : archiver: "unable to create codes indexer queue" => "unable to
create repo-archive queue"
* no nil check for failed queues, which causes unfriendly panic

After this PR, many goroutines could have better display name:

![image](https://github.com/go-gitea/gitea/assets/2114189/701b2a9b-8065-4137-aeaa-0bda2b34604a)

![image](https://github.com/go-gitea/gitea/assets/2114189/f1d5f50f-0534-40f0-b0be-f2c9daa5fe92)
2023-05-26 07:31:55 +00:00
..
admin_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
admin.go Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
applications.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
auths.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
config.go Rewrite logger system (#24726) 2023-05-21 22:35:11 +00:00
diagnosis.go Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
emails.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
hooks.go Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
main_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
notice.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
orgs.go Sort users and orgs on explore by recency by default (#24279) 2023-05-06 22:04:55 +08:00
packages.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
queue_tester.go Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
queue.go Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
repos.go Fix unclear IsRepositoryExist logic (#24374) 2023-04-28 14:14:26 -04:00
runners.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
stacktrace.go Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
users_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
users.go Split "modules/context.go" to separate files (#24569) 2023-05-08 17:36:54 +08:00