mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-12 14:52:39 +00: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:
|
app_server:
|
||||||
expand: true,
|
expand: true,
|
||||||
flatten: false,
|
flatten: false,
|
||||||
src: ['app.coffee'],
|
src: ['app.coffee', 'cluster.coffee'],
|
||||||
dest: './',
|
dest: './',
|
||||||
ext: '.js'
|
ext: '.js'
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ module.exports = (grunt) ->
|
||||||
|
|
||||||
watch:
|
watch:
|
||||||
server_coffee:
|
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']
|
tasks: ["clean", 'coffee', 'mochaTest']
|
||||||
|
|
||||||
clean: ["app/js", "test/unit/js", "app.js"]
|
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-transloadit": "0.0.4",
|
||||||
"node-uuid": "~1.4.1",
|
"node-uuid": "~1.4.1",
|
||||||
"pngcrush": "0.0.3",
|
"pngcrush": "0.0.3",
|
||||||
|
"recluster": "^0.3.7",
|
||||||
"request": "2.14.0",
|
"request": "2.14.0",
|
||||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#master",
|
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#master",
|
||||||
"stream-buffers": "~0.2.5",
|
"stream-buffers": "~0.2.5",
|
||||||
|
|
Loading…
Reference in a new issue