remove redundant call to UpdateRepoStats during migration (#18591)
There is no need to call UpdateRepoStats in the InsertIssues and InsertPullRequests function. They are only called during migration by the CreateIssues and CreateReviews methods of the gitea uploader. The UpdateRepoStats function will be called by the Finish method of the gitea uploader after all reviews and issues are inserted. Calling it before is therefore redundant and the associated SQL requests are not cheap. The statistics tests done after inserting an issue or a pull request are also removed. They predate the implementation of UpdateRepoStats, back when the calculation of the statistics was an integral part of the migration function. The UpdateRepoStats is now tested independantly and these tests are no longer necessary. Signed-off-by: singuliere <singuliere@autistici.org> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>tokarchuk/v1.17
parent
5faf055097
commit
3a91f845e8
Loading…
Reference in new issue