async-job-adapter-active_job 0.10.0 → 0.12.0
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
- checksums.yaml.gz.sig +0 -0
- data/lib/async/job/adapter/active_job/executor.rb +8 -2
- data/lib/async/job/adapter/active_job/interface.rb +2 -2
- data/lib/async/job/adapter/active_job/railtie.rb +3 -3
- data/lib/async/job/adapter/active_job/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36873f3cd52e06462bdd73217a4176fdaf7cd458f2da0316bfa69519d1bdca99
|
4
|
+
data.tar.gz: '0694a274303bad0cc146ed531cbe10358416f0e46d74a5126a40563e9813a1cc'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 244e4b18674fd7cdeb6680352bf154a298c0aa7efaa24a84aa850119f54ce231878e7f91d77c98c78f6222b60610583cd7cff775f66c367f982c376712b240c3
|
7
|
+
data.tar.gz: 259a097e1931650b0d77014db832887876cc837babf99a193776b024149d6372323931be057f432f6ca141c3f16fd5c8e2ce54b72626dcafe8cda7ab0b304b55
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -17,8 +17,14 @@ module Async
|
|
17
17
|
|
18
18
|
# Execute the given job.
|
19
19
|
def call(job)
|
20
|
-
|
21
|
-
|
20
|
+
Console.debug(self, "Executing job...", job: job)
|
21
|
+
begin
|
22
|
+
::ActiveJob::Base.execute(job)
|
23
|
+
rescue => error
|
24
|
+
# Error handling is done by the job itself.
|
25
|
+
# Ignore the error here, as ActiveJob has already logged unhandled errors.
|
26
|
+
# Console::Event::Failure.for(error).emit(self, "Failed to execute job!", job: job)
|
27
|
+
end
|
22
28
|
|
23
29
|
@delegate&.call(job)
|
24
30
|
end
|
@@ -15,14 +15,14 @@ module Async
|
|
15
15
|
|
16
16
|
# Enqueue a job for processing.
|
17
17
|
def enqueue(job)
|
18
|
-
|
18
|
+
Console.debug(self, "Enqueueing job...", id: job.job_id)
|
19
19
|
@delegate.call(serialize(job))
|
20
20
|
end
|
21
21
|
|
22
22
|
# Enqueue a job for processing at a specific time.
|
23
23
|
def enqueue_at(job, timestamp)
|
24
24
|
# We assume the given timestamp is the same as `job.scheduled_at` which is true in every case we've seen so far.
|
25
|
-
|
25
|
+
Console.debug(self, "Scheduling job...", id: job.job_id, scheduled_at: job.scheduled_at)
|
26
26
|
@delegate.call(serialize(job))
|
27
27
|
end
|
28
28
|
|
@@ -38,16 +38,16 @@ module Async
|
|
38
38
|
# @parameter name [String] The name of the backend.
|
39
39
|
# @parameter aliases [Array(String)] The aliases for the backend.
|
40
40
|
# @parameter block [Proc] The block that defines the backend.
|
41
|
-
def
|
41
|
+
def define_queue(name, *aliases, &block)
|
42
42
|
@definitions[name] = block
|
43
43
|
|
44
44
|
if aliases.any?
|
45
|
-
|
45
|
+
alias_queue(name, *aliases)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
49
|
# Define an alias for a queue.
|
50
|
-
def
|
50
|
+
def alias_queue(name, *aliases)
|
51
51
|
aliases.each do |alias_name|
|
52
52
|
@aliases[alias_name] = name
|
53
53
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-job-adapter-active_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
38
38
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
39
39
|
-----END CERTIFICATE-----
|
40
|
-
date: 2024-08-
|
40
|
+
date: 2024-08-09 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: async-job
|
metadata.gz.sig
CHANGED
Binary file
|