async-job-adapter-active_job 0.14.0 → 0.14.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2dd9f7593bc4e508c98ca5cff8a163fc594872625467667138213a3ab8f2ed78
4
- data.tar.gz: 78d52a6b38482a80ee4c227d8f753baa2662d313d6a59e284f35de2e00b84e32
3
+ metadata.gz: ea1f70c52b6ac8fef768e6f873af46fc7d41f0fcaf2135821a85a6585289b3e5
4
+ data.tar.gz: 10961b83ada11d421f0c253f54c342323e87961a8f5718326a17323aaf7d004b
5
5
  SHA512:
6
- metadata.gz: f205bafb6e23f4eed08575db38d96ec18e4f7e9bad444830b03b6e5a33fac62d91749f0e2ab4bf0328a2fa5192ee19bbdcf182c792de83464555871112674e26
7
- data.tar.gz: e239ac52ec5e7bfae69347c3dcedd4cb0d6dffae60114bcdad4e3c3528c66a49b1bf2c2e4b940ea447b631abb028192336aab1e81b6806fdb7a3539118b532c8
6
+ metadata.gz: c1624087283cb466494db419e184a624826b072db17782e7b69a650f4acce0ef11a4f072645b1304580f5ea4febf50f1dad3c0a632ca5c9d956241f3d905f7f1
7
+ data.tar.gz: a890ddfc103218be83e6eb954c619e21bb1991c5c16e7a58b1c061d9c19013c3c181bd75a5c453af2c6a0b6a62cffbadfd54ab1b96aede5406aa64e9e7ca7cc0
checksums.yaml.gz.sig CHANGED
Binary file
@@ -5,6 +5,8 @@
5
5
 
6
6
  require 'active_job/queue_adapters/abstract_adapter'
7
7
 
8
+ require 'kernel/sync'
9
+
8
10
  module ActiveJob
9
11
  module QueueAdapters
10
12
  class AsyncJobAdapter < AbstractAdapter
@@ -14,12 +16,16 @@ module ActiveJob
14
16
 
15
17
  # Enqueue a job for processing.
16
18
  def enqueue(job)
17
- @dispatcher.call(job)
19
+ Sync do
20
+ @dispatcher.call(job)
21
+ end
18
22
  end
19
23
 
20
24
  # Enqueue a job for processing at a specific time.
21
25
  def enqueue_at(job, timestamp)
22
- @dispatcher.call(job)
26
+ Sync do
27
+ @dispatcher.call(job)
28
+ end
23
29
  end
24
30
  end
25
31
  end
@@ -17,7 +17,7 @@ module Async
17
17
  # Prepare the dispacher with the given definitions and aliases.
18
18
  # @parameter definitions [Hash(String, Proc)] The definitions to use constructing queues.
19
19
  # @parameter aliases [Hash(String, Proc)] The aliases for the definitions.
20
- def initialize(definitions, aliases = {})
20
+ def initialize(definitions = {}, aliases = {})
21
21
  @definitions = definitions
22
22
  @aliases = aliases
23
23
 
@@ -30,6 +30,9 @@ module Async
30
30
  # @attribute [Hash(String, String)] The aliases for the definitions.
31
31
  attr :aliases
32
32
 
33
+ # @attribute [Hash(String, Queue)] The queues that have been constructed.
34
+ attr :queues
35
+
33
36
  # Look up a queue by name, constructing it if necessary using the given definition.
34
37
  # @parameter name [String] The name of the queue.
35
38
  def [](name)
@@ -7,7 +7,7 @@ module Async
7
7
  module Job
8
8
  module Adapter
9
9
  module ActiveJob
10
- VERSION = "0.14.0"
10
+ VERSION = "0.14.1"
11
11
  end
12
12
  end
13
13
  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.14.0
4
+ version: 0.14.1
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-11 00:00:00.000000000 Z
40
+ date: 2024-08-14 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