do not mention DelayedJob anymore

This commit is contained in:
did 2012-02-06 02:44:02 -08:00
parent fa36b95a9d
commit 5fd244e66c
4 changed files with 1 additions and 58 deletions

View File

@ -28,7 +28,7 @@ Installation:
gem 'locomotive_cms', :path => '../../Desktop/NoCoffee/LocomotiveCMS/engine/', :require => 'locomotive/engine'
gem 'unicorn'
2/ bundle exec rails g mongoid:config
!!!!2/ bundle exec rails g mongoid:config !!! => not needed anymore
3/ bundle exec rails g locomotive:install

View File

@ -23,8 +23,4 @@ The Locomotive Engine has been correctly installed in your Rails application.
5. Enjoy !
Note: If you want to use DelayedJob, be sure to launch it:
> rake jobs:work
===============================================================================

View File

@ -1,48 +0,0 @@
require 'delayed_job_mongoid'
module Delayed
module Backend
module Base
module ClassMethods
# Add a job to the queue
def enqueue(*args)
object = args.shift
unless object.respond_to?(:perform)
raise ArgumentError, 'Cannot enqueue items which do not respond to perform'
end
attributes = {
:job_type => object.class.name.demodulize.underscore,
:payload_object => object,
:priority => Delayed::Worker.default_priority,
:run_at => nil
}
if args.first.respond_to?(:[])
attributes.merge!(args.first)
else
attributes.merge!({
:priority => args.first || Delayed::Worker.default_priority,
:run_at => args[1]
})
end
self.create(attributes)
end
end
def failed?
failed_at.present?
end
end
module Mongoid
class Job
field :job_type
field :step
field :site_id, :type => BSON::ObjectId
# referenced_in :site
end
end
end
end

View File

@ -1,5 +0,0 @@
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
require 'delayed/command'
Delayed::Command.new(ARGV).daemonize