resque-bus 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.mdown CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This gem uses Redis and Resque to allow simple asynchronous communication between apps.
4
4
 
5
+ ### Install
6
+
7
+ To install, include the 'resque-bus' gem and add the following to your Rakefile:
8
+
9
+ ```ruby
10
+ require "resque_bus/tasks"
11
+ ```
12
+
5
13
  ### Example
6
14
 
7
15
  Application A can publish an event
@@ -4,6 +4,11 @@ module ResqueBus
4
4
 
5
5
  class << self
6
6
  def perform(attributes = {})
7
+ if ResqueBus.local_mode == :suppress
8
+ ResqueBus.log_worker("Suppressed: #{attributes.inspect}")
9
+ return # not doing anything
10
+ end
11
+
7
12
  ResqueBus.log_worker("Local running: #{attributes.inspect}")
8
13
 
9
14
  # looking for subscriptions, not queues
@@ -12,8 +17,7 @@ module ResqueBus
12
17
  to_publish = bus_attr.merge(attributes || {})
13
18
  if ResqueBus.local_mode == :standalone
14
19
  ResqueBus.enqueue_to(sub.queue_name, sub.class_name, bus_attr.merge(attributes || {}))
15
- # defaults to inline mode
16
- else ResqueBus.local_mode == :inline
20
+ else # defaults to inline mode
17
21
  sub.execute!(to_publish)
18
22
  end
19
23
  end
@@ -1,5 +1,5 @@
1
1
  module Resque
2
2
  module Bus
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-18 00:00:00.000000000 Z
12
+ date: 2014-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: resque