delayed_job_on_steroids 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -20,6 +20,7 @@ rescue LoadError
20
20
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
21
21
  end
22
22
 
23
+ gem 'rspec', '~>1.2.9'
23
24
  require 'spec/rake/spectask'
24
25
  Spec::Rake::SpecTask.new(:spec)
25
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 2.0.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{delayed_job_on_steroids}
8
- s.version = "2.0.1"
8
+ s.version = "2.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tobias L\303\274tke", "Aleksey Palazhchenko"]
12
- s.date = %q{2010-05-07}
12
+ s.date = %q{2010-08-14}
13
13
  s.description = %q{Delated_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background.}
14
14
  s.email = %q{aleksey.palazhchenko@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
45
45
  s.homepage = %q{http://github.com/AlekSi/delayed_job_on_steroids}
46
46
  s.rdoc_options = ["--charset=UTF-8"]
47
47
  s.require_paths = ["lib"]
48
- s.rubygems_version = %q{1.3.6}
48
+ s.rubygems_version = %q{1.3.7}
49
49
  s.summary = %q{Database-backed asynchronous priority queue system, extended and improved}
50
50
  s.test_files = [
51
51
  "spec/database.rb",
@@ -59,7 +59,7 @@ Gem::Specification.new do |s|
59
59
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
60
60
  s.specification_version = 3
61
61
 
62
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
62
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
63
63
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
64
64
  else
65
65
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
@@ -16,6 +16,7 @@ module Delayed
16
16
  opts.on('--max-priority=number', Integer, 'Maximum priority of jobs to run.') { |n| Delayed::Worker.max_priority = n }
17
17
  opts.on('--job-types=types', String, 'Type of jobs to run.') { |t| Delayed::Worker.job_types = t.split(',') }
18
18
  opts.on('--keep-failed-jobs', 'Do not remove failed jobs from database.') { Delayed::Worker.destroy_failed_jobs = false }
19
+ opts.on('--pid-file=file', String, 'Write PID to file.') { |f| @pid_file = f }
19
20
  opts.on('--log-file=file', String, 'Use specified file to log instead of Rails default logger.') do |f|
20
21
  Delayed::Worker.logger = ActiveSupport::BufferedLogger.new(f)
21
22
  end
@@ -59,11 +60,11 @@ module Delayed
59
60
  end
60
61
 
61
62
  def write_pid
62
- dir = "#{RAILS_ROOT}/tmp/pids"
63
+ @pid_file ||= "#{RAILS_ROOT}/tmp/pids/dj_#{Delayed::Worker.name.parameterize('_')}.pid"
64
+ dir = File.dirname(@pid_file)
63
65
  Dir.mkdir(dir) unless File.exists?(dir)
64
- pid = "#{dir}/dj_#{Delayed::Worker.name.parameterize('_')}.pid"
65
- File.open(pid, 'w') { |f| f.write(Process.pid) }
66
- at_exit { File.delete(pid) if File.exist?(pid) }
66
+ File.open(@pid_file, 'w') { |f| f.write(Process.pid) }
67
+ at_exit { File.delete(@pid_file) if File.exist?(@pid_file) }
67
68
  end
68
69
 
69
70
  def setup_logger
data/spec/database.rb CHANGED
@@ -7,6 +7,7 @@ gem 'sqlite3-ruby'
7
7
 
8
8
  require File.dirname(__FILE__) + '/../init'
9
9
  require 'spec'
10
+ require 'logger'
10
11
 
11
12
  Delayed::Worker.logger = Logger.new('/tmp/dj.log')
12
13
  ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => '/tmp/jobs.sqlite')
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_on_steroids
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 11
4
5
  prerelease: false
5
6
  segments:
6
7
  - 2
7
8
  - 0
8
- - 1
9
- version: 2.0.1
9
+ - 2
10
+ version: 2.0.2
10
11
  platform: ruby
11
12
  authors:
12
13
  - "Tobias L\xC3\xBCtke"
@@ -15,16 +16,18 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-05-07 00:00:00 +04:00
19
+ date: 2010-08-14 00:00:00 +04:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
22
23
  name: rspec
23
24
  prerelease: false
24
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
+ none: false
25
27
  requirements:
26
28
  - - ">="
27
29
  - !ruby/object:Gem::Version
30
+ hash: 13
28
31
  segments:
29
32
  - 1
30
33
  - 2
@@ -76,23 +79,27 @@ rdoc_options:
76
79
  require_paths:
77
80
  - lib
78
81
  required_ruby_version: !ruby/object:Gem::Requirement
82
+ none: false
79
83
  requirements:
80
84
  - - ">="
81
85
  - !ruby/object:Gem::Version
86
+ hash: 3
82
87
  segments:
83
88
  - 0
84
89
  version: "0"
85
90
  required_rubygems_version: !ruby/object:Gem::Requirement
91
+ none: false
86
92
  requirements:
87
93
  - - ">="
88
94
  - !ruby/object:Gem::Version
95
+ hash: 3
89
96
  segments:
90
97
  - 0
91
98
  version: "0"
92
99
  requirements: []
93
100
 
94
101
  rubyforge_project:
95
- rubygems_version: 1.3.6
102
+ rubygems_version: 1.3.7
96
103
  signing_key:
97
104
  specification_version: 3
98
105
  summary: Database-backed asynchronous priority queue system, extended and improved