gitea/services
Earl Warren fab73e4a3a
Actually recover from a panic in cron task (#28409)
- Currently there's code to recover gracefully from panics that happen
within the execution of cron tasks. However this recover code wasn't
being run, because `RunWithShutdownContext` also contains code to
recover from any panic and then gracefully shutdown Forgejo. Because
`RunWithShutdownContext` registers that code as last, that would get run
first which in this case is not behavior that we want.
- Move the recover code to inside the function, so that is run first
before `RunWithShutdownContext`'s recover code (which is now a noop).

Fixes: https://codeberg.org/forgejo/forgejo/issues/1910

Co-authored-by: Gusted <postmaster@gusted.xyz>
2023-12-10 20:15:06 +00:00
..
actions
agit
asymkey
attachment
auth
automerge
context
convert
cron Actually recover from a panic in cron task (#28409) 2023-12-10 20:15:06 +00:00
externalaccount
feed
forms
gitdiff
indexer
issue
lfs Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
mailer
markup
migrations
mirror
notify
org
packages
pull Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
release
repository Also sync DB branches on push if necessary (#28361) 2023-12-09 13:30:56 +00:00
secrets
task
uinotification
user
webhook
wiki