Permalink
Browse files

There, connection logic seems more sensible now

  • Loading branch information...
1 parent fa189f1 commit 9183173fa48c9a0a48cff8d68ae66d4b8d15e434 @akavlie committed May 3, 2012
Showing with 7 additions and 11 deletions.
  1. +2 −5 .gitignore
  2. +3 −3 controllers/AnalysisController.js
  3. +2 −1 controllers/TwitterController.js
  4. +0 −2 models/ActivityItem.js
View
7 .gitignore
@@ -4,8 +4,5 @@ logs/*.log
pids/*.pid
tmp
conf/conf.js
-cache/data.noun
-cache/index.adj
-cache/index.adv
-cache/index.noun
-cache/index.verb
+cache/index.*
+cache/data.*
View
6 controllers/AnalysisController.js
@@ -1,6 +1,6 @@
-/**
- * Twitter Controller
- **/
+// Analysis Controller
+//
+// Core natural language processing controller
var sys = require('sys'),
http = require('http'),
View
3 controllers/TwitterController.js
@@ -36,7 +36,8 @@ module.exports = {
var attr = task.attributes || {};
- if (attr.connected || attr.last_ping.getTime() > Date.now() - stream_timeout) {
+ if (attr.connected && attr.last_ping.getTime() > Date.now() - stream_timeout) {
+ console.log('already connected')
return res.send("Already streaming...");
}
View
2 models/ActivityItem.js
@@ -8,8 +8,6 @@ var mongoose = require('mongoose'),
natural = require('natural'),
ObjectId = Schema.ObjectId;
-
-
var tokenizer = new natural.TreebankWordTokenizer();
natural.LancasterStemmer.attach();
var wordnet = new natural.WordNet('./cache');

0 comments on commit 9183173

Please sign in to comment.