active_beaneater 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cef3e6bc47d58798b948cfda4e5a627fbf2426cf
4
- data.tar.gz: d433befd9375f671e29ff1a5179e6b650c210f32
3
+ metadata.gz: e9d127fb6028772978571a9df5cdfff244e54eea
4
+ data.tar.gz: 2cf00e9ec7978cf21dc409f06fdf675cb9bde2cb
5
5
  SHA512:
6
- metadata.gz: ec2d3fcd031b05c967927cba6e84fbecf6a2db7718955b0886bd56fe04c77cc8cf6a3fdfff51675a8f76cbf7fed0ca9877070ee418871d7dae00466b3871a979
7
- data.tar.gz: 77c3774729f824c819d6419d16d7a3c7596adb11a736559a344400bcf8c5561cdbe650f4d15e697a766c72d12878eb139489a1d5285c5320a9123f9eb1ed421a
6
+ metadata.gz: 18ce4455be16dca14b0afa58a18005efc10d376044bb9ce84bd4e7c29cc2bdbb1f0a1df31861258d501fd849a8544d4bb2ed9aa0e56ae086efbaba02ce03deb3
7
+ data.tar.gz: 33c8d97a9ef54aa97e04e5fa2c4a535f359431c68e7ca342bf01dd989b9ff1d1c328428d115fedc99d112509eb8168afa5551c633d10e97e9ddd940dd5c62629
data/README.md CHANGED
@@ -45,6 +45,29 @@ ActiveBeaneater.configure do |config|
45
45
  end
46
46
  ```
47
47
 
48
+ ### Creating jobs
49
+
50
+ Jobs are normal ActiveJob jobs. There is an helper for ActiveBeaneater options:
51
+
52
+ ```ruby
53
+ class ImportJob < ActiveJob::Base
54
+ include ActiveBeaneater::QueueOptions
55
+
56
+ queue_as :import # Name of the queue, will be prefixed before hitting beanstalk
57
+ queue_priority :low # Can be a number or :low or :high, smaller number = higher priority
58
+ queue_timeout_after 15.minutes # Timeout
59
+
60
+ def perform(someid)
61
+ # Perform job here
62
+
63
+ # You may do:
64
+ # native_job.try(:touch)
65
+ # To extend your timeout, like a keep alive, native_job may be nil when
66
+ # running specs with another active job backend
67
+ end
68
+ end
69
+ ```
70
+
48
71
  ### Running jobs
49
72
 
50
73
  Simply issue `active_beaneater` from within your app root directory.
@@ -1,3 +1,3 @@
1
1
  module ActiveBeaneater
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -5,7 +5,7 @@ module ActiveBeaneater
5
5
  client = Rails.application.config.beaneater.client
6
6
 
7
7
 
8
- tube_names = []
8
+ tube_names = [ActiveBeaneater.resolve_queue_name('mailers')]
9
9
 
10
10
  ObjectSpace.each_object(Class) do |k|
11
11
  if k.ancestors.include?(ActiveJob::Base)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_beaneater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Goy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-22 00:00:00.000000000 Z
11
+ date: 2015-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -130,3 +130,4 @@ signing_key:
130
130
  specification_version: 4
131
131
  summary: Simple beanstalk backend for Rails's ActiveJob.
132
132
  test_files: []
133
+ has_rdoc: