Permalink
Browse files

Allow for more 'massive' pdfs, multi-server deploy

  • Loading branch information...
1 parent 0b44303 commit 74d0d56c4b7fb98e4f9a99ff309ba37efe9305de @wavded wavded committed Mar 30, 2012
Showing with 10 additions and 7 deletions.
  1. +8 −5 Makefile
  2. +2 −2 app.js
View
@@ -8,9 +8,12 @@ all: watch
watch:
@always app.js
-deploy_live: server = sawyer@172.25.20.120
+deploy_live: serverA = sawyer@172.25.20.111
+deploy_live: serverB = sawyer@172.25.20.120
deploy_live:
- @rsync -az --exclude=".git" --delete * ${server}:${path}
- @echo -e " ${instance} | copied files to ${server}"
- @ssh ${server} "sudo restart ${project}"
- @echo -e " ${instance} | restarting app on ${server}"
+ @rsync -az --exclude=".git" --delete * ${serverA}:${path}
+ @rsync -az --exclude=".git" --delete * ${serverB}:${path}
+ @echo -e " ${instance} | copied files to ${serverA} and ${serverB}"
+ @ssh ${serverA} "sudo restart ${project}"
+ @ssh ${serverB} "sudo restart ${project}"
+ @echo -e " ${instance} | restarting app on ${serverA} and ${serverB}"
View
@@ -7,7 +7,7 @@ const index = require('fs').readFileSync(__dirname+'/index.html')
function afterwards (res, wkhtmltopdf) {
if (!res.finished) {
wkhtmltopdf.kill('SIGTERM')
- res.end('Unable to load within 5 seconds')
+ res.end('Unable to load within 30 seconds')
}
}
@@ -29,7 +29,7 @@ function snagit (query, res) {
var wkhtmltopdf = spawn('wkhtmltopdf',[ (query.html ? '-' : query.url),'-'])
if (query.html) wkhtmltopdf.stdin.end(query.html)
wkhtmltopdf.stdout.pipe(res)
- setTimeout(afterwards, 5000, res, wkhtmltopdf)
+ setTimeout(afterwards, 30000, res, wkhtmltopdf)
}
}

0 comments on commit 74d0d56

Please sign in to comment.