mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	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:
		| @@ -197,7 +197,7 @@ func ProcReceive(ctx context.Context, repo *repo_model.Repository, gitRepo *git. | ||||
| 			return nil, fmt.Errorf("Failed to update pull ref. Error: %w", err) | ||||
| 		} | ||||
|  | ||||
| 		pull_service.AddToTaskQueue(pr) | ||||
| 		pull_service.AddToTaskQueue(ctx, pr) | ||||
| 		pusher, err := user_model.GetUserByID(ctx, opts.UserID) | ||||
| 		if err != nil { | ||||
| 			return nil, fmt.Errorf("Failed to get user. Error: %w", err) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user