blaxter-delayed_job 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +2 -2
- data/VERSION +1 -1
- data/delayed_job.gemspec +5 -2
- data/lib/delayed/job.rb +2 -1
- metadata +2 -2
data/README.markdown
CHANGED
@@ -58,7 +58,7 @@ By default, it will delete failed jobs. If you want to keep failed jobs, set `De
|
|
58
58
|
|
59
59
|
Same thing for successful jobs. They're deleted by default and, to keep them, set `Delayed::Job.destroy_successful_jobs = false`. They will be marked with finished_at. This is useful for gathering statistics like how long jobs took between entering the queue (created_at) and being finished (finished_at).
|
60
60
|
|
61
|
-
You have
|
61
|
+
You have several named scopes for searching unfinished/finsihed/failed jobs, very useful when destroy_successful_jobs is false `Delayed::Job.unfinished`, `Delayed::Job.finsihed`, `Delayed::Job.failed`.
|
62
62
|
|
63
63
|
Here is an example of changing job parameters in Rails:
|
64
64
|
|
@@ -185,7 +185,7 @@ You can invoke `rake jobs:clear` to delete all jobs in the queue.
|
|
185
185
|
|
186
186
|
Changes
|
187
187
|
-------
|
188
|
-
|
188
|
+
* 2.0.1: named_scope Delayed::Job.failed/finished/unfinished (jobs that have failed, have finished ok or still haven't been done)
|
189
189
|
* 2.0.0: Contains the changes made in this fork, the ability to create workers with individual constraints without interfere to other workers
|
190
190
|
|
191
191
|
* 1.7.0: Added failed_at column which can optionally be set after a certain amount of failed job attempts. By default failed job attempts are destroyed after about a month.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.1
|
data/delayed_job.gemspec
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
1
4
|
# -*- encoding: utf-8 -*-
|
2
5
|
|
3
6
|
Gem::Specification.new do |s|
|
4
7
|
s.name = %q{delayed_job}
|
5
|
-
s.version = "2.0.
|
8
|
+
s.version = "2.0.1"
|
6
9
|
|
7
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
11
|
s.authors = ["Tobias L\303\274tke"]
|
9
|
-
s.date = %q{2009-08-
|
12
|
+
s.date = %q{2009-08-19}
|
10
13
|
s.description = %q{Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background. It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks.}
|
11
14
|
s.email = %q{tobi@leetsoft.com}
|
12
15
|
s.files = [
|
data/lib/delayed/job.rb
CHANGED
@@ -29,8 +29,9 @@ module Delayed
|
|
29
29
|
|
30
30
|
ParseObjectFromYaml = /\!ruby\/\w+\:([^\s]+)/
|
31
31
|
|
32
|
-
named_scope :unfinished, :conditions => { :finished_at => nil }
|
32
|
+
named_scope :unfinished, :conditions => { :finished_at => nil, :failed_at => nil }
|
33
33
|
named_scope :finished, :conditions => [ "finished_at IS NOT NULL" ]
|
34
|
+
named_scope :failed, :conditions => [ "failed_at IS NOT NULL" ]
|
34
35
|
|
35
36
|
class << self
|
36
37
|
# When a worker is exiting, make sure we don't have any locked jobs.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blaxter-delayed_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Tobias L\xC3\xBCtke"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-19 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|