forked from forgejo/forgejo
Add context parameter to some database functions (#26055)
To avoid deadlock problem, almost database related functions should be have ctx as the first parameter. This PR do a refactor for some of these functions.
This commit is contained in:
parent
c42b71877e
commit
b167f35113
50 changed files with 209 additions and 237 deletions
|
@ -122,7 +122,7 @@ func TestMigrate_InsertPullRequests(t *testing.T) {
|
|||
Issue: i,
|
||||
}
|
||||
|
||||
err := InsertPullRequests(p)
|
||||
err := InsertPullRequests(db.DefaultContext, p)
|
||||
assert.NoError(t, err)
|
||||
|
||||
_ = unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{IssueID: i.ID})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue