Просмотр исходного кода

Merge pull request #1408 from sharelatex/bg-increase-timeout-on-clone-project

increase timeout for cloning project to 5 minutes

GitOrigin-RevId: 949c7553f331573b391ff37f180e80b60c260cf5
Brian Gough 7 лет назад
Родитель
Сommit
205da19173

+ 1 - 0
services/web/app/coffee/Features/Project/ProjectController.coffee

@@ -112,6 +112,7 @@ module.exports = ProjectController =
 				res.sendStatus 200
 
 	cloneProject: (req, res, next)->
+		res.setTimeout(5 * 60 * 1000) # allow extra time for the copy to complete
 		metrics.inc "cloned-project"
 		project_id = req.params.Project_id
 		projectName = req.body.projectName

+ 1 - 0
services/web/test/unit/coffee/Project/ProjectControllerTests.coffee

@@ -142,6 +142,7 @@ describe "ProjectController", ->
 		@res =
 			locals:
 				jsPath:"js path here"
+			setTimeout: sinon.stub()
 
 	describe "updateProjectSettings", ->
 		it "should update the name", (done) ->