Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ App.prototype.listArticles = function(userId, n, fresh) {
return this.Article.list(userId, n, fresh);
};

App.prototype.startScraping = function() {
App.prototype.listenForJobs = function() {
this.connections.queue.handle(SCRAPE_QUEUE, this.handleScrapeJob.bind(this));
this.connections.queue.handle(VOTE_QUEUE, this.handleVoteJob.bind(this));
return this;
Expand Down
2 changes: 1 addition & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function start() {
instance.on('lost', abort);

function createServer() {
if (config.thrifty) instance.startScraping();
if (config.thrifty) instance.listenForJobs();
var server = http.createServer(web(instance, config));

process.on('SIGTERM', shutdown);
Expand Down
2 changes: 1 addition & 1 deletion lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function start() {

function beginWork() {
instance.on('lost', shutdown);
instance.startScraping();
instance.listenForJobs();
}

function shutdown() {
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ cd node-articles-nlp

heroku create

heroku addons:add mongohq
heroku addons:add cloudamqp
heroku addons:create mongohq
heroku addons:create cloudamqp

heroku config:set NODE_ENV=production
heroku config:set VIEW_CACHE=true
Expand Down