mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
added simple clustering master
This commit is contained in:
parent
79292b4602
commit
e03ee96216
3 changed files with 12 additions and 2 deletions
|
@ -14,7 +14,7 @@ module.exports = (grunt) ->
|
|||
app_server:
|
||||
expand: true,
|
||||
flatten: false,
|
||||
src: ['app.coffee'],
|
||||
src: ['app.coffee', 'cluster.coffee'],
|
||||
dest: './',
|
||||
ext: '.js'
|
||||
|
||||
|
@ -36,7 +36,7 @@ module.exports = (grunt) ->
|
|||
|
||||
watch:
|
||||
server_coffee:
|
||||
files: ['app/*.coffee','app/**/*.coffee', 'test/unit/coffee/**/*.coffee', 'test/unit/coffee/*.coffee', "app.coffee"]
|
||||
files: ['app/*.coffee','app/**/*.coffee', 'test/unit/coffee/**/*.coffee', 'test/unit/coffee/*.coffee', "app.coffee", "cluster.coffee"]
|
||||
tasks: ["clean", 'coffee', 'mochaTest']
|
||||
|
||||
clean: ["app/js", "test/unit/js", "app.js"]
|
||||
|
|
9
services/filestore/cluster.coffee
Normal file
9
services/filestore/cluster.coffee
Normal file
|
@ -0,0 +1,9 @@
|
|||
recluster = require "recluster" # https://github.com/doxout/recluster
|
||||
path = require "path"
|
||||
|
||||
cluster = recluster path.join(__dirname, 'app.js'), {
|
||||
workers: 2,
|
||||
backoff: 0,
|
||||
readyWhen: "listening"
|
||||
}
|
||||
cluster.run()
|
|
@ -20,6 +20,7 @@
|
|||
"node-transloadit": "0.0.4",
|
||||
"node-uuid": "~1.4.1",
|
||||
"pngcrush": "0.0.3",
|
||||
"recluster": "^0.3.7",
|
||||
"request": "2.14.0",
|
||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#master",
|
||||
"stream-buffers": "~0.2.5",
|
||||
|
|
Loading…
Reference in a new issue