delayed_resque 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjE0NjkzODhkNGI2NDNlMTgwYzAzYzBiZWI5MDlhYzkwMGNkYTM2OA==
4
+ ZDRhZjRmM2UzMDZhNTZhNWY0ZjVhYjljN2EyMGU3YzYzNTRjNjhlMg==
5
5
  data.tar.gz: !binary |-
6
- NTI0MDE4ZDA4ZjZiMTM3ZjNhYzJkYjllNDRlNGM4YjYzZjRmYjNlOA==
6
+ OGRkMWUyZDA1NWI0MjEwMGEwMDZjYzZhNjk4MWFmMjlmYWVlNGEwNg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YjliYTNkNjBjMzAzNDNmZTcwN2IwMzg4MzE0ODRkMjBiNmU0MDJmZDVjNjY4
10
- NzhkMDdmY2NmMjEzM2Y1NzUyZjg0MDhhNGJhMWRhMmFiM2Q1Y2E5YjBiNjgx
11
- ZDZhNDgxOTY1NGI3NmJiOWUyYzU2NTFhZDQxMjZmMzdjNDBhMmQ=
9
+ YjE5ZGEwMGY4Njc3YmRmZDIzMWVmZWIxNDQxNzdhZjIzZTJjNWUwZDNlZjg4
10
+ ZTk0NGM2NjgyZTMxMjNlY2I4MzMwODFkZDQ0YmUxMmJiNGU0ZTM5YTA0M2I5
11
+ MzQ5NDY0NDA2NTU5MmRlOTMxZmQ4MmRkMjg3N2Q1YmE5OWE1ZTc=
12
12
  data.tar.gz: !binary |-
13
- MTY0MTFjOGQ1NjIyYmYxMzMwZjY2ZDM2ZWEzZjVmZGM4NjEzNjJjNWM5YjRl
14
- NmNiY2FjNmY2OTkwYjM3ZTlkNTBlNTlmMjQ4MzAwYTEwNjBhODc1NmM5Yzg2
15
- ODY4MzRkYjAxOTVjZDVkMzMwYmE0M2FjYTZhN2EwY2U5NTFmODU=
13
+ Y2FmYjcyOTVjNTQ4MjY4ZTM4YzI5MjUwMjY4MmM1NDMzYTZiNjFkYTRkMmU0
14
+ M2M3Njk1NzExYmYzN2ViMDQ1NTA3NjQzMDFiNjI5YzIzMDQ2Y2UyYTFiMGI4
15
+ ZmE2YjQyMDRiNjZjNDFiMTBkYmRkN2IyNDVlNWQwMzc1ZTk1Yzg=
data/README.md CHANGED
@@ -1,11 +1,16 @@
1
1
  delayed_resque
2
2
  ==============
3
3
 
4
- Provides delayed_job syntax to resque.
4
+ Provides [delayed_job](https://github.com/collectiveidea/delayed_job) syntax to [resque](https://github.com/resque/resque).
5
+
6
+ [![Code Climate](https://codeclimate.com/github/meetme2meat/delayed_resque.png)](https://codeclimate.com/github/meetme2meat/delayed_resque)
7
+
8
+ ### DelayedJob syntax supported are
9
+ 1 . `delay`
5
10
 
6
11
  Call `.delay.method(params)` on any object and it will be processed in the background.
7
12
 
8
- # with delayed_job
13
+ # with delay
9
14
  @user.delay.activate!(@device)
10
15
 
11
16
  Parameters can be scalar values, active record instances, or classes (but not instances of non-AR objects).
@@ -14,10 +19,34 @@ The queue to use for the method can be specified on the delay method:
14
19
 
15
20
  @user.delay(:queue => :device_activation).activate!(@device)
16
21
 
22
+ 2 . `delay` + `unqiue`
23
+
24
+ ```
25
+ # with delay and unique
26
+ @user.delay(:unique => true).activate!(@device)
27
+ ```
28
+
29
+ 3 . `delay` + `run_at`
30
+
31
+ ```
32
+ # with delay and run_at
33
+ @user.delay(:run_at => 10.second.from_now).activate!(@device)
34
+ ```
35
+ Ideally this accomplice in conjunction with [resque-scheduler](https://github.com/bvandenbos/resque-scheduler) so make sure to start resque-scheduler for this for more on how the resque-scheduler work check the [Readme](https://github.com/bvandenbos/resque-scheduler/blob/master/README.markdown)
36
+
37
+ 4 . `handle_asynchronously`
38
+
39
+ Out of the box support for `handle_asynchronously` method supported over `delayed_job`
40
+
41
+
42
+ Caveats
43
+ ----------
44
+ All the gem is attempt to touch the all aspect of `delayed_job` to `resque` but there are some which cannot be achieved currently one of them is `priority` and reason for that is `resque` does not have currently a robust priority mechanism like `delayed_job`
45
+
17
46
  Credits
18
47
  -------
19
48
 
20
49
  Based on the work of https://github.com/defunkt/resque and
21
50
  https://github.com/collectiveidea/delayed_job.
22
51
 
23
- Special Thanks to https://github.com/k1w1 for the spec and the extracting most of the code out of delayed_job
52
+ Special Thanks to https://github.com/k1w1 for extracting most of the code out of delayed_job
@@ -4,7 +4,7 @@ module DelayedResque
4
4
  def initialize(payload_class, target, options)
5
5
  @payload_class = payload_class
6
6
  @target = target
7
- @options = {:queue => "default"}.update(options)
7
+ @options = options
8
8
  end
9
9
 
10
10
  def method_missing(method, *args)
@@ -1,3 +1,3 @@
1
1
  module DelayedResque
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_resque
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Viren Negi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-26 00:00:00.000000000 Z
11
+ date: 2013-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails