1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-03 01:45:47 +00:00
gitea/routers/web
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 Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
auth Split "modules/context.go" to separate files (#24569) 2023-05-08 17:36:54 +08:00
devtest Remove untranslatable on_date key (#24106) 2023-04-15 13:01:54 +02:00
events Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
explore Sort users and orgs on explore by recency by default (#24279) 2023-05-06 22:04:55 +08:00
feed Pass 'not' to commit count (#24473) 2023-05-08 07:10:53 +00:00
healthcheck Refactor setting.Database.UseXXX to methods (#23354) 2023-03-07 18:51:06 +08:00
misc Decouple the different contexts from each other (#24786) 2023-05-21 09:50:53 +08:00
org Refactor rename user and rename organization (#24052) 2023-05-21 23:13:47 +08:00
repo Use the type RefName for all the needed places and fix pull mirror sync bugs (#24634) 2023-05-26 01:04:48 +00:00
shared Respect original content when creating secrets (#24745) 2023-05-16 14:49:40 +08:00
user Refactor rename user and rename organization (#24052) 2023-05-21 23:13:47 +08:00
auth_windows.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
auth.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
base.go Use standard HTTP library to serve files (#24693) 2023-05-13 16:04:57 +02:00
goget.go Support SSH for go get (#24664) 2023-05-12 09:44:37 +00:00
home.go Refactor cookie (#24107) 2023-04-13 15:45:33 -04:00
metrics.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
nodeinfo.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
swagger_json.go Group template helper functions, remove Printf, improve template error messages (#23982) 2023-04-08 21:15:22 +08:00
web.go Add the ability to pin Issues (#24406) 2023-05-25 15:17:19 +02:00
webfinger.go Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) 2023-04-04 10:08:23 +08:00