background_job 0.0.1.rc1 → 0.0.1.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -2
- data/background_job.gemspec +0 -1
- data/lib/background_job/configuration.rb +8 -0
- data/lib/background_job/version.rb +1 -1
- data/lib/background_job.rb +11 -3
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ed529ee1ec4a0599d6d2f56fd65e51dd889117e104c586d6562b4b1c65b7e75
|
4
|
+
data.tar.gz: a39749d73db7546fe4fd39f28e703733c61fa4c207cd0155f94ef362540ea2f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e95ce61812f3e11f0b57dde326af88cd83d11b13fcad7b57883a118ef1707e5454df8021a27b162ec828077de2d25a6d71ddb8af9a32ce5d8af6c652138b8605
|
7
|
+
data.tar.gz: 2375fa6c0604919cd07507807abc91b6eca873f5b57cc072e4020fae6527957a7f2f1584e14883da77a35dc59d1a1cbe71cd01764e337f1f4f28884a028d719e
|
data/Gemfile.lock
CHANGED
data/background_job.gemspec
CHANGED
data/lib/background_job.rb
CHANGED
@@ -42,9 +42,17 @@ module BackgroundJob
|
|
42
42
|
faktory: 'Faktory',
|
43
43
|
}.freeze
|
44
44
|
|
45
|
-
|
46
|
-
|
47
|
-
|
45
|
+
def self.job(service, job_name, **options)
|
46
|
+
service = service.to_sym
|
47
|
+
unless SERVICES.key?(service)
|
48
|
+
raise Error, "Service `#{service}' is not supported. Supported services are: #{SERVICES.keys.join(', ')}"
|
49
|
+
end
|
50
|
+
Jobs.const_get(SERVICES[service]).new(job_name, **options)
|
51
|
+
end
|
52
|
+
|
53
|
+
SERVICES.each do |service_name, _const_name|
|
54
|
+
define_singleton_method(service_name) do |job_name, **options|
|
55
|
+
job(service_name, job_name, **options)
|
48
56
|
end
|
49
57
|
end
|
50
58
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: background_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos G. Zimmermann
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.0.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: connection_pool
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.0
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0.0
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: multi_json
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|