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