1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-19 16:44:25 +00:00
gitea/services/pull
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
..
check_test.go Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
check.go Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
comment.go Make more functions use ctx instead of db.DefaultContext (#24068) 2023-04-14 14:18:28 -04:00
commit_status.go Support for status check pattern (#24633) 2023-05-17 16:11:13 +08:00
edits.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
lfs.go Refactor and tidy-up the merge/update branch code (#22568) 2023-03-07 15:07:35 -05:00
main_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
merge_merge.go Refactor and tidy-up the merge/update branch code (#22568) 2023-03-07 15:07:35 -05:00
merge_prepare.go Refactor merge/update git command calls (#23366) 2023-03-09 09:48:52 -06:00
merge_rebase.go Merge message template support for rebase without merge commit (#22669) 2023-05-22 09:01:46 +08:00
merge_squash.go Improve squash merge commit author and co-author with private emails (#22977) 2023-03-09 22:17:04 -05:00
merge_test.go Support template for merge message description (#22248) 2022-12-29 14:40:20 +02:00
merge.go Merge message template support for rebase without merge commit (#22669) 2023-05-22 09:01:46 +08:00
patch_unmerged.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
patch.go Refactor and tidy-up the merge/update branch code (#22568) 2023-03-07 15:07:35 -05:00
pull_test.go Support template for merge message description (#22248) 2022-12-29 14:40:20 +02:00
pull.go Refresh the refernce of the closed PR when reopening (#24231) 2023-05-08 14:39:32 +08:00
review.go Make more functions use ctx instead of db.DefaultContext (#24068) 2023-04-14 14:18:28 -04:00
temp_repo.go Refactor and tidy-up the merge/update branch code (#22568) 2023-03-07 15:07:35 -05:00
update_rebase.go Refactor and tidy-up the merge/update branch code (#22568) 2023-03-07 15:07:35 -05:00
update.go Refactor and tidy-up the merge/update branch code (#22568) 2023-03-07 15:07:35 -05:00