funktor 0.4.1 → 0.4.2
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 -1
- data/lib/active_job/queue_adapters/funktor_adapter.rb +7 -2
- data/lib/funktor/job.rb +1 -1
- data/lib/funktor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57488e1ec71535021b02e646cce074552b08bab597ccf0394df4eaee7b9b8480
|
4
|
+
data.tar.gz: 2d38386a8da34bc2737da98dad4336b90820b03d85c18b52ca0d09d0d2d85a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ea9cc75cc179ff340d35fa48d5dbbaba7604b30b1361efb0a3ed8783de6b929279c39cd237ca1b78863e0622a9eb2a5c8f23f2b707d40159f09bdf788f97b4c
|
7
|
+
data.tar.gz: 8b018ebd3e15892fcf4b13feedb77873f41a59d75a62b6ee498808e9848f0e717785e4347d9f294b737025519f527a792b6b64c8c70334b8023e8733205c5aee
|
data/Gemfile.lock
CHANGED
@@ -16,17 +16,22 @@ module ActiveJob
|
|
16
16
|
"worker" => JobWrapper.to_s,
|
17
17
|
"wrapped" => job.class,
|
18
18
|
"queue" => job.class.work_queue,
|
19
|
+
"delay" => 0,
|
19
20
|
"worker_params" => [ job.serialize ]
|
20
21
|
})
|
21
22
|
end
|
22
23
|
|
23
24
|
def enqueue_at(job, timestamp) # :nodoc:
|
25
|
+
delay = (timestamp.utc - Time.now.utc).round
|
26
|
+
if delay < 0
|
27
|
+
delay = 0
|
28
|
+
end
|
24
29
|
job.provider_job_id = Funktor.job_pusher.push({
|
25
30
|
"worker" => JobWrapper.to_s,
|
26
31
|
"wrapped" => job.class,
|
27
32
|
"queue" => job.class.work_queue,
|
28
|
-
"
|
29
|
-
"
|
33
|
+
"delay" => delay,
|
34
|
+
"worker_params" => [ job.serialize ]
|
30
35
|
})
|
31
36
|
end
|
32
37
|
|
data/lib/funktor/job.rb
CHANGED
@@ -38,7 +38,7 @@ module Funktor
|
|
38
38
|
# TODO - In Funktor Pro we need to override this method (or do something else) so that
|
39
39
|
# we can schedule jobs farther in the future than 15 minutes. We do this here in case a
|
40
40
|
# retry sequence goes too long.
|
41
|
-
jdelay = job_data["delay"]
|
41
|
+
jdelay = job_data["delay"] || 0
|
42
42
|
return jdelay < 900 ? jdelay : 900
|
43
43
|
end
|
44
44
|
|
data/lib/funktor/version.rb
CHANGED