coney_island 0.17.3 → 0.17.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/coney_island/coney_island_adapter.rb +8 -9
- data/lib/coney_island/submitter.rb +0 -1
- data/lib/coney_island/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba75ef6cdbabd5978440f368c350f13b90c78320e560ca01983bd8c2fde11b12
|
4
|
+
data.tar.gz: bfee194d127676dbcc487a0d52b2fa99910033e2bb0e8e12618be6d89bd941eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3f656c12ac0ec8b77ca055ca47825ab7e9d8c51f83da368426aeda7b434b341d59133c0e09d9248586e68d885492b80300af477f275bfd5c2d8fabc4d0c5141
|
7
|
+
data.tar.gz: 864403d7f743b07b31b4ed930156324e4e4b59c32e7bc97b73e920c0ca099778bf970e6adb94e3347d098814f0c529890ba7ce057847e57ec919d0d05747728e
|
@@ -10,12 +10,18 @@ module ActiveJob
|
|
10
10
|
#
|
11
11
|
# Rails.application.config.active_job.queue_adapter = :coney_island
|
12
12
|
def enqueue(job) #:nodoc:
|
13
|
-
ConeyIsland::Submitter.submit
|
13
|
+
ConeyIsland::Submitter.submit job.class, :perform, args: job.arguments, work_queue: job.queue_name, timeout: get_timeout_from_args(job),
|
14
|
+
retry_limit: get_retry_from_args(job), singleton: true
|
14
15
|
end
|
15
16
|
|
16
17
|
def enqueue_at(job, timestamp) #:nodoc:
|
18
|
+
params = {args: job.arguments, work_queue: job.queue_name, timeout: get_timeout_from_args(job),
|
19
|
+
retry_limit: get_retry_from_args(job), singleton: true}
|
17
20
|
delay = timestamp - Time.current.to_f
|
18
|
-
|
21
|
+
if delay > 0
|
22
|
+
params[:delay] = delay.round
|
23
|
+
end
|
24
|
+
ConeyIsland::Submitter.submit job.class, :perform, params
|
19
25
|
end
|
20
26
|
|
21
27
|
def get_timeout_from_args(job)
|
@@ -26,13 +32,6 @@ module ActiveJob
|
|
26
32
|
job.class::RETRY_LIMIT if job.class.const_defined? :RETRY_LIMIT
|
27
33
|
end
|
28
34
|
|
29
|
-
class JobWrapper #:nodoc:
|
30
|
-
class << self
|
31
|
-
def perform(job_data)
|
32
|
-
Base.execute job_data.stringify_keys!
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
35
|
end
|
37
36
|
end
|
38
37
|
end
|
data/lib/coney_island/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coney_island
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Draut
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-10-
|
13
|
+
date: 2018-10-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|