anachronic 0.43.3 → 0.44.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
- data/Gemfile.lock +2 -2
- data/lib/anachronic/executors/resque.rb +26 -0
- data/lib/anachronic/executors/sidekiq.rb +26 -0
- data/lib/anachronic/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a9d5dc6fb44c62df056b23ee82749130f11331dc589918b4cbd0582274824d2
|
4
|
+
data.tar.gz: fcccffa0545173600919bd6888318a047db22c6d7d70175e6f01ae7b1e705a54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cffcf27a85768dcb4826d76df0850e3e7f6b363fb39f4182fadc414caecb7d17d5c550bd7c55249b5d4ec7387eeffdfd74923fbd211d868c35daae8e30d1d907
|
7
|
+
data.tar.gz: 0a94207e7181afadc8ee8fcec943678c493ca151dc22c426beed64ffde0266d35bb7175d483672bc17bcadee5e2f502318c86288e4fb2e9143750a2565ba7404
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anachronic
|
4
|
+
module Executors
|
5
|
+
# Default executor for Resque backend
|
6
|
+
class Resque
|
7
|
+
class << self
|
8
|
+
def call(instance, method, *args)
|
9
|
+
executor.perform(instance, method, *args)
|
10
|
+
end
|
11
|
+
|
12
|
+
def executor
|
13
|
+
@executor ||= begin
|
14
|
+
return unless defined? Resque
|
15
|
+
|
16
|
+
Class.new(Resque) do
|
17
|
+
def self.perform(instance, method, *args)
|
18
|
+
instance.public_send(method, *args)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Anachronic
|
4
|
+
module Executors
|
5
|
+
# Default executor for Sidekiq backend
|
6
|
+
class Sidekiq
|
7
|
+
class << self
|
8
|
+
def call(instance, method, *args)
|
9
|
+
executor.perform_async(instance, method, *args)
|
10
|
+
end
|
11
|
+
|
12
|
+
def executor
|
13
|
+
@executor ||= begin
|
14
|
+
Class.new(Sidekiq) do
|
15
|
+
include ::Sidekiq::Worker
|
16
|
+
|
17
|
+
def perform_async(instance, method, *args)
|
18
|
+
instance.public_send(method, *args)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/anachronic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anachronic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.44.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danielius Visockas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Removing boilerplate from async code
|
14
14
|
email:
|
@@ -35,6 +35,8 @@ files:
|
|
35
35
|
- lib/anachronic/configuration.rb
|
36
36
|
- lib/anachronic/error.rb
|
37
37
|
- lib/anachronic/executors/application_job.rb
|
38
|
+
- lib/anachronic/executors/resque.rb
|
39
|
+
- lib/anachronic/executors/sidekiq.rb
|
38
40
|
- lib/anachronic/override.rb
|
39
41
|
- lib/anachronic/version.rb
|
40
42
|
homepage: https://github.com/dvisockas/anachronic
|
@@ -60,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
62
|
- !ruby/object:Gem::Version
|
61
63
|
version: '0'
|
62
64
|
requirements: []
|
63
|
-
rubygems_version: 3.
|
65
|
+
rubygems_version: 3.2.15
|
64
66
|
signing_key:
|
65
67
|
specification_version: 4
|
66
68
|
summary: Moving your method execution to the world of asynchronity
|