From 0fce1950d23e1e13930b4f99839de794fc95dfcd Mon Sep 17 00:00:00 2001 From: Ryan Daigle Date: Mon, 23 May 2011 16:00:21 -0400 Subject: [PATCH] Fix enqueuing --- Procfile | 2 +- Rakefile | 4 ++-- jobs/{index_tweets.rb => index_tweet.rb} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename jobs/{index_tweets.rb => index_tweet.rb} (66%) diff --git a/Procfile b/Procfile index c09eb71..06f9faa 100644 --- a/Procfile +++ b/Procfile @@ -1,4 +1,4 @@ web: bundle exec thin start -p $PORT -e $RACK_ENV stream: bundle exec rake tweetstream:stream --trace -worker: bundle exec rake resque:work QUEUE=normal VERBOSE=1 --trace +worker: bundle exec rake resque:work QUEUE=normal --trace clock: bundle exec clockwork clock.rb diff --git a/Rakefile b/Rakefile index 6f28b18..b288e3c 100644 --- a/Rakefile +++ b/Rakefile @@ -6,9 +6,9 @@ require "tweetstream" require "resque" require 'resque/tasks' -STDOUT.sync = true +require File.dirname(__FILE__) + "/jobs/index_tweet" -Pusher.app_id = 5700 +STDOUT.sync = true task "tweetstream:stream" do TweetStream::Client.new(ENV["TWITTER_USERNAME"], ENV["TWITTER_PASSWORD"]).track(ENV["TWITTER_KEYWORD"]) do |status| diff --git a/jobs/index_tweets.rb b/jobs/index_tweet.rb similarity index 66% rename from jobs/index_tweets.rb rename to jobs/index_tweet.rb index 9936a74..f8dd25d 100644 --- a/jobs/index_tweets.rb +++ b/jobs/index_tweet.rb @@ -3,7 +3,7 @@ class IndexTweet @queue = :normal def self.perform(tweet) - puts "Indexing: #{tweet}" + puts "Indexing: #{tweet["text"]}" end end