mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 13:50:39 +00:00
Move all push update operations to a queue (#10133)
* Fix test * Add no queue for test only * improve code * Auto watch whatever branch operation * Fix lint * Rename noqueue to immediate * Remove old PushUpdate function * Fix tests Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
910947fbcd
commit
dd1a651b58
16 changed files with 552 additions and 585 deletions
|
@ -14,9 +14,9 @@ import (
|
|||
"code.gitea.io/gitea/modules/convert"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/repofiles"
|
||||
repo_module "code.gitea.io/gitea/modules/repository"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
repo_service "code.gitea.io/gitea/services/repository"
|
||||
)
|
||||
|
||||
// GetBranch get a branch of a repository
|
||||
|
@ -160,10 +160,8 @@ func DeleteBranch(ctx *context.APIContext) {
|
|||
}
|
||||
|
||||
// Don't return error below this
|
||||
if err := repofiles.PushUpdate(
|
||||
ctx.Repo.Repository,
|
||||
ctx.Repo.BranchName,
|
||||
repofiles.PushUpdateOptions{
|
||||
if err := repo_service.PushUpdate(
|
||||
&repo_service.PushUpdateOptions{
|
||||
RefFullName: git.BranchPrefix + ctx.Repo.BranchName,
|
||||
OldCommitID: c.ID.String(),
|
||||
NewCommitID: git.EmptySHA,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue