-
Notifications
You must be signed in to change notification settings - Fork 14
pfeed delivery as background job
Ok, so you have been using Pfeed for sometime , and you feel that creation of the activity feed is slowing down your request-response loop and you require delivery to happen as background job, yeah?
Here you go!
gem sources -a http://gems.github.com
sudo gem install tobi-delayed_jobCreate a table in your database
create_table :delayed_jobs, :force => true do |table| table.integer :priority, :default => 0 table.integer :attempts, :default => 0 table.text :handler table.text :last_error table.datetime :run_at table.datetime :locked_at table.datetime :failed_at table.string :locked_by table.timestamps end
and require “delayed_job” either in your environment.rb or any suitable initializers
Thats it, really! , pfeed will figure out presence of delayed_job and use it for asynchronous processing. You will need to run worker instances to process the queued jobs as per your infrastructure. Go read more about delayed_job ( http://wiki.github.com/tobi/delayed_job )