Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove rails 2 support. delayed_job 2.1 will only support Rails 3

  • Loading branch information...
commit b9b38f60d691b8c2c21a6fd509ca142c2dfd68d4 1 parent 77b0482
@bkeepers bkeepers authored
View
2  delayed_job.gemspec
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
This gem is collectiveidea's fork (http://github.com/collectiveidea/delayed_job)."
s.email = 'brandon@collectiveidea.com'
s.extra_rdoc_files = 'README.textile'
- s.files = Dir.glob('{contrib,generators,lib,rails,recipes,spec,tasks}/**/*') +
+ s.files = Dir.glob('{contrib,lib,recipes,spec}/**/*') +
%w(init.rb MIT-LICENSE README.textile)
s.homepage = 'http://github.com/collectiveidea/delayed_job'
s.rdoc_options = ["--main", "README.textile", "--inline-source", "--line-numbers"]
View
22 generators/delayed_job/delayed_job_generator.rb
@@ -1,22 +0,0 @@
-class DelayedJobGenerator < Rails::Generator::Base
- default_options :skip_migration => false
-
- def manifest
- record do |m|
- m.template 'script', 'script/delayed_job', :chmod => 0755
- if !options[:skip_migration] && defined?(ActiveRecord)
- m.migration_template "migration.rb", 'db/migrate',
- :migration_file_name => "create_delayed_jobs"
- end
- end
- end
-
-protected
-
- def add_options!(opt)
- opt.separator ''
- opt.separator 'Options:'
- opt.on("--skip-migration", "Don't generate a migration") { |v| options[:skip_migration] = v }
- end
-
-end
View
21 generators/delayed_job/templates/migration.rb
@@ -1,21 +0,0 @@
-class CreateDelayedJobs < ActiveRecord::Migration
- def self.up
- create_table :delayed_jobs, :force => true do |table|
- table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue
- table.integer :attempts, :default => 0 # Provides for retries, but still fail eventually.
- table.text :handler # YAML-encoded string of the object that will do work
- table.text :last_error # reason for last failure (See Note below)
- table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
- table.datetime :locked_at # Set when a client is working on this object
- table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
- table.string :locked_by # Who is working on this object (if locked)
- table.timestamps
- end
-
- add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority'
- end
-
- def self.down
- drop_table :delayed_jobs
- end
-end
View
5 generators/delayed_job/templates/script
@@ -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
View
1  init.rb
@@ -1 +0,0 @@
-require File.join(File.dirname(__FILE__), 'rails', 'init')
View
2  lib/delayed_job.rb
@@ -5,7 +5,7 @@
require File.dirname(__FILE__) + '/delayed/yaml_ext'
require File.dirname(__FILE__) + '/delayed/backend/base'
require File.dirname(__FILE__) + '/delayed/worker'
-require File.dirname(__FILE__) + '/delayed/railtie' if defined?(::Rails::Railtie)
+require File.dirname(__FILE__) + '/delayed/railtie'
Object.send(:include, Delayed::MessageSending)
Module.send(:include, Delayed::MessageSending::ClassMethods)
View
5 rails/init.rb
@@ -1,5 +0,0 @@
-require 'delayed_job'
-
-config.after_initialize do
- Delayed::Worker.guess_backend
-end
View
1  tasks/jobs.rake
@@ -1 +0,0 @@
-require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'delayed', 'tasks'))
Please sign in to comment.
Something went wrong with that request. Please try again.