dm-delayed-job 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,9 @@
1
- # Prevent problem with extlib 0.9.11:
2
- # extlib-0.9.11 NameError: method `to_time' not defined in Time
3
- # http://groups.google.com/group/datamapper/browse_thread/thread/98f9a69dca23d80
4
- gem 'extlib', '>= 0.9.12'
5
1
  require 'extlib'
6
2
 
3
+ require 'dm-core'
7
4
  require 'dm-aggregates'
8
5
  require 'dm-timestamps'
6
+ require 'active_support'
9
7
 
10
8
  module Delayed
11
9
 
@@ -18,7 +16,7 @@ module Delayed
18
16
  include DataMapper::Resource
19
17
 
20
18
  MAX_ATTEMPTS = 25
21
- MAX_RUN_TIME = 4.hours
19
+ MAX_RUN_TIME = 4 * 60 * 60
22
20
  storage_names[:default]='delayed_jobs'
23
21
 
24
22
  # By default failed jobs are destroyed after too many attempts.
data/spec/database.rb CHANGED
@@ -5,10 +5,7 @@ require 'rubygems'
5
5
  require 'spec'
6
6
 
7
7
  puts "Running tests with DataMapper as the ORM."
8
- require 'active_support'
9
- require 'dm-core'
10
8
  require File.dirname(__FILE__) + '/../init'
11
- DataMapper.logger = Logger.new('/tmp/dj.log')
12
9
  DataMapper.setup(:default, 'sqlite3::memory:')
13
10
  class Story
14
11
  include DataMapper::Resource
data/spec/job_spec.rb CHANGED
@@ -100,7 +100,7 @@ describe Delayed::Job do
100
100
  job = Delayed::Job.first
101
101
 
102
102
  job.last_error.should =~ /did not work/
103
- job.last_error.should =~ /job_spec.rb:10:in `perform'/
103
+ job.last_error.should =~ /job_spec.rb:\d+:in `perform'/
104
104
  job.attempts.should == 1
105
105
 
106
106
  job.run_at.should > Delayed::Job.db_time_now - 10.minutes
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - "Tobias L\xC3\xBCtke"
@@ -16,8 +16,69 @@ cert_chain: []
16
16
 
17
17
  date: 2010-02-22 00:00:00 +02:00
18
18
  default_executable:
19
- dependencies: []
20
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: extlib
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 9
30
+ - 12
31
+ version: 0.9.12
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: dm-aggregates
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ version: "0"
44
+ type: :runtime
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
47
+ name: dm-timestamps
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ version: "0"
56
+ type: :runtime
57
+ version_requirements: *id003
58
+ - !ruby/object:Gem::Dependency
59
+ name: dm-core
60
+ prerelease: false
61
+ requirement: &id004 !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ segments:
66
+ - 0
67
+ version: "0"
68
+ type: :runtime
69
+ version_requirements: *id004
70
+ - !ruby/object:Gem::Dependency
71
+ name: activesupport
72
+ prerelease: false
73
+ requirement: &id005 !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ segments:
78
+ - 0
79
+ version: "0"
80
+ type: :runtime
81
+ version_requirements: *id005
21
82
  description: Delated_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background. It is port to DataMapper of direct extraction from Shopify where the job table is responsible for a multitude of core tasks.
22
83
  email: tobi@leetsoft.com
23
84
  executables: []