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 +4 -4
- data/README.md +23 -0
- data/lib/active_beaneater/version.rb +1 -1
- data/lib/active_beaneater/worker.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9d127fb6028772978571a9df5cdfff244e54eea
|
4
|
+
data.tar.gz: 2cf00e9ec7978cf21dc409f06fdf675cb9bde2cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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
|
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:
|