async-job 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af9713d27f0673152bf48d491b2af0d1191c5c2a51c280568b62d2c1b3aab41e
4
- data.tar.gz: bebd84bc0e6511bf1b380573944a3c7707792650d6befde35ec43a4818081c0f
3
+ metadata.gz: 9a816771aa488ab674c70776181481a1de707a9e6eb4c8520325b62049015a89
4
+ data.tar.gz: d15d2f5f2276d96da9c91a7badf33b6bb86b9159de1839b25b8b77fc666166af
5
5
  SHA512:
6
- metadata.gz: 2f8d9b3fd19bd05edc9d6e2707604a8092a1d32076d0d04a77985373a80f517917b03d92070910e858c4ca41b1fec06f83dc0b2fa17746165e269562fc1d5ba6
7
- data.tar.gz: 9454114d0dad1a26fb1e8f9b586bc971b1c0e0e1e0a02ce0cc30987530d54361d73fdcf4562927fc38d8129151d746049f1a6b695924d990641982a06a57c275
6
+ metadata.gz: 0d47ff44888af2ce4ca369e2d1644e4d99f0dd179ca73f1f50d2362154087560031d11490f5b3887f4f1303e8eaaf4d597d8de66804b3b5f38d19d1a4ab29b03
7
+ data.tar.gz: e8f8c0a81b6980aacc5f46a5fa53de95d74ffe190af12a06542b14599d32331e941d39b44d60b80a00eff88fbb78605303dd58dc73be0b98ec42351becc49365
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,18 @@
1
+ require_relative 'redis/server'
2
+
3
+ module Async
4
+ module Job
5
+ module Backend
6
+ module Redis
7
+ def self.new(**options)
8
+ endpoint = options.fetch(:endpoint) {Async::Redis.local_endpoint}
9
+ prefix = options.fetch(:prefix) {"async:job"}
10
+
11
+ client = Async::Redis::Client.new(endpoint)
12
+
13
+ return Async::Job::Backend::Redis::Server.new(client, prefix)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,11 @@
1
+ require_relative 'backend/redis'
2
+
3
+ module Async
4
+ module Job
5
+ module Backend
6
+ def self.new(backend: Async::Job::Backend::Redis, **options)
7
+ backend.new(**options)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Job
8
- VERSION = "0.1.0"
8
+ VERSION = "0.2.0"
9
9
  end
10
10
  end
data/lib/async/job.rb CHANGED
@@ -4,4 +4,4 @@
4
4
  # Copyright, 2024, by Samuel Williams.
5
5
 
6
6
  require_relative 'job/version'
7
- require_relative 'job/backend/redis/server'
7
+ require_relative 'job/backend'
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-job
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -74,6 +74,8 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - lib/async/job.rb
77
+ - lib/async/job/backend.rb
78
+ - lib/async/job/backend/redis.rb
77
79
  - lib/async/job/backend/redis/delayed_queue.rb
78
80
  - lib/async/job/backend/redis/job_store.rb
79
81
  - lib/async/job/backend/redis/processing_queue.rb
metadata.gz.sig CHANGED
Binary file