-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
36 lines (28 loc) · 1.44 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
You'll need to install redis to use Resque
redis is a key value store
If you're on OS X you can use homebrew to install it.
Most of this app is run from the command line and has no views/GUI
Steps to get this up and running:
bundle install
edit database.yml and call the dbs whatever you want
rake db:create
rake db:migrate
rake db:seed
from the console (rails c)
Politician.get_user_id_from_screen_name
This uses my apigee URL to hit twitters REST API (please substitute your own URL at the top of the politician model)
optional -
Politician.get_tweets_by_politicians
Politician.get_politicians_friends
resque tasks from the Command line
resque-web will give you a web interface
from the console
Task.start_cycle
then go to the resque-web interface and see the queues that have been created
from the CL
I usually run three workers working the three main queues, but if you did the optional tasks you'll want workers to work these queues also
rake resque:work QUEUE=nameofqueue
Look at the comments in the Tasks model to get an idea of what's going on here, but here's the gist.
We have a list of politicians we're keeping tabs on. We want to know who they follow (followers), who follows them (friends) and their tweets.
We also want to know who's talking about them. We use the twitter search api to find any mentions of their screen names and we call these folks activists.
We then want to get the activist's profiles, and their follower and friends lists.