forgejo/modules
wxiaoguang 58dfaf3a75
Improve queue & process & stacktrace (#24636)
Although some features are mixed together in this PR, this PR is not
that large, and these features are all related.

Actually there are more than 70 lines are for a toy "test queue", so
this PR is quite simple.

Major features:

1. Allow site admin to clear a queue (remove all items in a queue)
* Because there is no transaction, the "unique queue" could be corrupted
in rare cases, that's unfixable.
* eg: the item is in the "set" but not in the "list", so the item would
never be able to be pushed into the queue.
* Now site admin could simply clear the queue, then everything becomes
correct, the lost items could be re-pushed into queue by future
operations.
3. Split the "admin/monitor" to separate pages
4. Allow to download diagnosis report
* In history, there were many users reporting that Gitea queue gets
stuck, or Gitea's CPU is 100%
    * With diagnosis report, maintainers could know what happens clearly

The diagnosis report sample:
[gitea-diagnosis-20230510-192913.zip](https://github.com/go-gitea/gitea/files/11441346/gitea-diagnosis-20230510-192913.zip)
, use "go tool pprof profile.dat" to view the report.


Screenshots:


![image](https://github.com/go-gitea/gitea/assets/2114189/320659b4-2eda-4def-8dc0-5ea08d578063)


![image](https://github.com/go-gitea/gitea/assets/2114189/c5c46fae-9dc0-44ca-8cd3-57beedc5035e)


![image](https://github.com/go-gitea/gitea/assets/2114189/6168a811-42a1-4e64-a263-0617a6c8c4fe)

---------

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-11 07:45:47 +00:00
..
actions show workflow config error on file view also (#24267) 2023-04-22 22:16:54 -04:00
activitypub Add Chef package registry (#22554) 2023-02-06 09:49:21 +08:00
analyze Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
assetfs Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
auth Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
avatar Allow webp images as avatars (#24248) 2023-04-21 13:15:49 -04:00
base Use a general Eval function for expressions in templates. (#23927) 2023-04-07 21:25:49 +08:00
cache Update redis library to support redis v7 (#24114) 2023-04-13 18:41:04 -04:00
charset Update go tool dependencies, restructure lint targets (#24239) 2023-04-22 14:53:00 -04:00
container Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
context Make repository response support HTTP range request (#24592) 2023-05-09 15:34:36 +08:00
csv Refactor locale number (#24134) 2023-04-17 11:37:23 +08:00
doctor Merge setting.InitXXX into one function with options (#24389) 2023-05-04 11:55:35 +08:00
emoji Fix unstable emoji sort (#22346) 2023-01-05 13:58:51 +02:00
eventsource Move convert package to services (#22264) 2022-12-29 10:57:15 +08:00
generate Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
git Pass 'not' to commit count (#24473) 2023-05-08 07:10:53 +00:00
gitgraph Add context cache as a request level cache (#22294) 2023-02-15 21:37:34 +08:00
graceful Remove most path-based golangci exclusions (#24214) 2023-04-19 22:08:01 -04:00
hcaptcha Consume hcaptcha and pwn deps (#22610) 2023-01-29 09:49:51 -06:00
highlight test_env: hardcode major go version in use (#23464) 2023-03-14 16:09:01 -04:00
hostmatcher Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
html Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
httpcache Set X-Gitea-Debug header once (#23361) 2023-03-08 15:40:04 -05:00
httplib Make repository response support HTTP range request (#24592) 2023-05-09 15:34:36 +08:00
indexer Remove unnecessary code (#24610) 2023-05-10 04:57:06 +00:00
issue/template Allow issue templates to not render title (#22589) 2023-01-26 22:45:49 -06:00
json Update gitea-vet to check FSFE REUSE (#22004) 2022-12-02 22:14:57 +08:00
label Make label templates have consistent behavior and priority (#23749) 2023-04-10 16:44:02 +08:00
lfs Make repository response support HTTP range request (#24592) 2023-05-09 15:34:36 +08:00
log Enable forbidigo linter (#24278) 2023-04-24 05:50:58 -04:00
markup Merge setting.InitXXX into one function with options (#24389) 2023-05-04 11:55:35 +08:00
mcaptcha Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
metrics include build info in Prometheus metrics (#22819) 2023-02-08 19:54:01 +02:00
migration Scoped labels (#22585) 2023-02-18 21:17:39 +02:00
mirror Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
nosql Update redis library to support redis v7 (#24114) 2023-04-13 18:41:04 -04:00
notification Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
options Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
packages Add RPM registry (#23380) 2023-05-05 20:33:37 +00:00
paginator Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
pprof Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
private Fix incorrect internal response type (#24173) 2023-04-17 23:10:40 -04:00
process Improve trace logging for pulls and processes (#22633) 2023-02-03 18:11:48 -05:00
proxy Use proxy for pull mirror (#22771) 2023-02-11 08:39:50 +08:00
proxyprotocol Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
public Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
queue Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
recaptcha Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
references Use correct captured group range when parsing cross-reference (#22672) 2023-01-31 10:08:05 +01:00
regexplru Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repository Replace placeholders in licenses (#24354) 2023-05-05 13:46:17 +00:00
secret Improve decryption failure message (#24573) 2023-05-07 19:29:43 +08:00
session Update redis library to support redis v7 (#24114) 2023-04-13 18:41:04 -04:00
setting Increase default LFS auth timeout from 20m to 24h (#24628) 2023-05-10 22:23:47 +08:00
sitemap Fix sitemap (#22272) 2022-12-30 23:31:00 +08:00
ssh Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
storage Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
structs Create a branch directly from commit on the create branch API (#22956) 2023-05-09 18:22:32 +08:00
svg Use a general approach to access custom/static/builtin assets (#24022) 2023-04-12 18:16:45 +08:00
sync Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
system Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
templates Modify luminance calculation and extract related functions into single files (#24586) 2023-05-10 11:19:03 +00:00
test Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
testlogger Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
timeutil Fix incorrect webhook time and use relative-time to display it (#24477) 2023-05-03 19:53:43 -04:00
translation Make repo size style matches others (commits/branches/tags) (#24408) 2023-04-28 17:23:19 -04:00
turnstile Add new captcha: cloudflare turnstile (#22369) 2023-02-05 15:29:03 +08:00
typesniffer Do not recognize text files as audio (#23355) 2023-03-07 22:40:41 -05:00
updatechecker Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
upload Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
uri Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
user Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
util Modify luminance calculation and extract related functions into single files (#24586) 2023-05-10 11:19:03 +00:00
validation Map OIDC groups to Orgs/Teams (#21441) 2023-02-08 14:44:42 +08:00
web Improve template system and panic recovery (#24461) 2023-05-04 14:36:34 +08:00
webhook Restructure webhook module (#22256) 2023-01-01 23:23:15 +08:00