mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
parallelFileDownloads defaults to 1, sql can't take it
This commit is contained in:
parent
d140964c5f
commit
98a07e07ed
2 changed files with 6 additions and 2 deletions
|
@ -6,6 +6,9 @@ mkdirp = require "mkdirp"
|
|||
OutputFileFinder = require "./OutputFileFinder"
|
||||
Metrics = require "./Metrics"
|
||||
logger = require "logger-sharelatex"
|
||||
settings = require("settings-sharelatex")
|
||||
|
||||
parallelFileDownloads = settings.parallelFileDownloads or 1
|
||||
|
||||
module.exports = ResourceWriter =
|
||||
syncResourcesToDisk: (project_id, resources, basePath, callback = (error) ->) ->
|
||||
|
@ -16,7 +19,7 @@ module.exports = ResourceWriter =
|
|||
jobs = for resource in resources
|
||||
do (resource) =>
|
||||
(callback) => @_writeResourceToDisk(project_id, resource, basePath, callback)
|
||||
async.parallelLimit jobs, 5, callback
|
||||
async.parallelLimit jobs, parallelFileDownloads, callback
|
||||
|
||||
_createDirectory: (basePath, callback = (error) ->) ->
|
||||
fs.mkdir basePath, (err) ->
|
||||
|
|
|
@ -41,4 +41,5 @@ module.exports =
|
|||
url: "http://localhost:3013"
|
||||
|
||||
smokeTest: false
|
||||
project_cache_length_ms: 60 * 60 * 24
|
||||
project_cache_length_ms: 60 * 60 * 24
|
||||
parallelFileDownloads:1
|
Loading…
Reference in a new issue