From f1ff14c5dce8c240e23659bbe63231ff7021ba88 Mon Sep 17 00:00:00 2001 From: Ron Cordell Date: Sun, 21 Aug 2016 15:47:21 -0700 Subject: [PATCH] Working pipeline --- mongodb/roles/mongod/tasks/main.yml | 5 + rest/.idea/workspace.xml | 268 ++++++++---------- rest/{rest.py => application.py} | 11 +- rest/requirements.txt | 38 +++ twitter/sentimentConsumer.py | 2 +- twitter/sentiments/sentimentProcessor.py | 3 +- .../twitter_utils/twitterStreamListener.py | 5 +- 7 files changed, 170 insertions(+), 162 deletions(-) rename rest/{rest.py => application.py} (94%) create mode 100644 rest/requirements.txt diff --git a/mongodb/roles/mongod/tasks/main.yml b/mongodb/roles/mongod/tasks/main.yml index 3a2135d..4bf30a3 100644 --- a/mongodb/roles/mongod/tasks/main.yml +++ b/mongodb/roles/mongod/tasks/main.yml @@ -33,3 +33,8 @@ sudo: yes service: name=mongod state=started +- name: Create the tweet sentiment collection + shell: mongo tweets --eval "db.createCollection('sentiment') + +- name: Create the sentiment geospatial index + shell: mongo tweets --eval 'db.sentiment.createIndex({ coordinates: "2dsphere" })' diff --git a/rest/.idea/workspace.xml b/rest/.idea/workspace.xml index 5367619..cecd40a 100644 --- a/rest/.idea/workspace.xml +++ b/rest/.idea/workspace.xml @@ -5,15 +5,11 @@ - - - - - - + - - + + + @@ -27,8 +23,8 @@ - - + + @@ -43,6 +39,18 @@ + + + + + + + + + + + + @@ -83,8 +91,8 @@ - - + + @@ -92,11 +100,21 @@ - + + + + + + + + + + + - - + + @@ -104,11 +122,21 @@ + + + + + + + + + + - - + + @@ -132,7 +160,6 @@ @@ -177,8 +205,8 @@ DEFINITION_ORDER - @@ -222,70 +250,8 @@