forgejo/services/cron
Gusted 026a4bb02d
[GITEA] Actually recover from a panic in cron task
- Backport #1911
- 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).
- Resolves #1910

(cherry picked from commit 761e1c83414407b65e331c2eeb4348c47acf0fbb)
2023-12-10 17:20:49 +01:00
..
cron.go
setting.go
tasks.go [GITEA] Actually recover from a panic in cron task 2023-12-10 17:20:49 +01:00
tasks_actions.go
tasks_basic.go
tasks_extended.go
tasks_test.go