do not mention DelayedJob anymore
This commit is contained in:
parent
fa36b95a9d
commit
5fd244e66c
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
===============================================================================
|
@ -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
|
@ -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
|
Loading…
Reference in New Issue
Block a user