forked from forgejo/forgejo
Make archival asynchronous
The prime benefit being sought here is for large archives to not clog up the rendering process and cause unsightly proxy timeouts. As a secondary benefit, archive-in-progress is moved out of the way into a /tmp file so that new archival requests for the same commit will not get fulfilled based on an archive that isn't yet finished. This asynchronous system is fairly primitive; request comes in, we'll spawn off a new goroutine to handle it, then we'll mark it as done. Status requests will see if the file exists in the final location, and report the archival as done when it exists. Fixes #11265
This commit is contained in:
parent
a104864da2
commit
64ac8440a7
43 changed files with 1216 additions and 85 deletions
|
@ -70,9 +70,9 @@ func TestAPISearchRepo(t *testing.T) {
|
|||
expectedResults
|
||||
}{
|
||||
{name: "RepositoriesMax50", requestURL: "/api/v1/repos/search?limit=50&private=false", expectedResults: expectedResults{
|
||||
nil: {count: 27},
|
||||
user: {count: 27},
|
||||
user2: {count: 27}},
|
||||
nil: {count: 28},
|
||||
user: {count: 28},
|
||||
user2: {count: 28}},
|
||||
},
|
||||
{name: "RepositoriesMax10", requestURL: "/api/v1/repos/search?limit=10&private=false", expectedResults: expectedResults{
|
||||
nil: {count: 10},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue