acidic_job 1.0.0.beta.3 → 1.0.0.beta.4
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/acidic_job/mixin.rb +3 -3
- data/lib/acidic_job/rails.rb +16 -5
- data/lib/acidic_job/version.rb +1 -1
- data/lib/acidic_job.rb +2 -10
- 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: 9516f1c035c3f7256c178aa23c6966f19420e718f2f0e24d0ec0d751c5e8beb5
|
4
|
+
data.tar.gz: 0dcf21315d4afefbd1861f69aff453b293818b9166fb58fe36ac45b62266ea13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c742edbc7e301b035276a93ca8d68f1118c6899b024ef7edbf0694790ee6804a18ae7e7d1c2a2d89c40b5e05b966a0bee9114a61aeca0307618c8d0715a047f
|
7
|
+
data.tar.gz: 5cfda7f2d2cdc602da3bcb6225e8c38647e79b1f1b08e153e4d524594551fc42ce4116240d4837dee59bf17adbf8390e5d0d036120816e0aa379cadb872c787a
|
data/Gemfile.lock
CHANGED
data/lib/acidic_job/mixin.rb
CHANGED
@@ -7,9 +7,6 @@ module AcidicJob
|
|
7
7
|
extend ActiveSupport::Concern
|
8
8
|
|
9
9
|
def self.wire_up(other)
|
10
|
-
raise UnknownJobAdapter unless (defined?(::ActiveJob::Base) && other < ::ActiveJob::Base) ||
|
11
|
-
(defined?(::Sidekiq::Worker) && other.include?(::Sidekiq::Worker))
|
12
|
-
|
13
10
|
# Ensure our `perform` method always runs first to gather parameters
|
14
11
|
# and run perform callbacks for Sidekiq workers
|
15
12
|
other.prepend PerformWrapper
|
@@ -76,6 +73,9 @@ module AcidicJob
|
|
76
73
|
end
|
77
74
|
|
78
75
|
def with_acidic_workflow(persisting: {}, &block)
|
76
|
+
raise UnknownJobAdapter unless (defined?(::AcidicJob::Base) && self.class < ::AcidicJob::Base) ||
|
77
|
+
(defined?(::AcidicJob::ActiveKiq) && self.class < ::AcidicJob::ActiveKiq)
|
78
|
+
|
79
79
|
raise RedefiningWorkflow if defined? @workflow_builder
|
80
80
|
|
81
81
|
@workflow_builder = WorkflowBuilder.new
|
data/lib/acidic_job/rails.rb
CHANGED
@@ -5,12 +5,23 @@ require "rails/railtie"
|
|
5
5
|
module AcidicJob
|
6
6
|
class Rails < ::Rails::Railtie
|
7
7
|
initializer "acidic_job.action_mailer_extension" do
|
8
|
-
ActiveSupport.on_load(:action_mailer) do
|
8
|
+
::ActiveSupport.on_load(:action_mailer) do
|
9
9
|
# Add `deliver_acidicly` to ActionMailer
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
::ActionMailer::Parameterized::MessageDelivery.include(Extensions::ActionMailer)
|
11
|
+
::ActionMailer::MessageDelivery.include(Extensions::ActionMailer)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
initializer "acidic_job.active_job_serializers" do
|
16
|
+
::ActiveSupport.on_load(:active_job) do
|
17
|
+
::ActiveJob::Serializers.add_serializers(
|
18
|
+
Serializers::ExceptionSerializer,
|
19
|
+
Serializers::FinishedPointSerializer,
|
20
|
+
Serializers::JobSerializer,
|
21
|
+
Serializers::RangeSerializer,
|
22
|
+
Serializers::RecoveryPointSerializer,
|
23
|
+
Serializers::WorkerSerializer
|
24
|
+
)
|
14
25
|
end
|
15
26
|
end
|
16
27
|
|
data/lib/acidic_job/version.rb
CHANGED
data/lib/acidic_job.rb
CHANGED
@@ -18,25 +18,17 @@ require_relative "acidic_job/extensions/action_mailer"
|
|
18
18
|
require_relative "acidic_job/extensions/noticed"
|
19
19
|
require_relative "acidic_job/mixin"
|
20
20
|
require_relative "acidic_job/base"
|
21
|
-
require_relative "acidic_job/active_kiq"
|
21
|
+
# require_relative "acidic_job/active_kiq"
|
22
22
|
|
23
|
+
require "active_job/serializers"
|
23
24
|
require_relative "acidic_job/serializers/exception_serializer"
|
24
25
|
require_relative "acidic_job/serializers/finished_point_serializer"
|
25
26
|
require_relative "acidic_job/serializers/job_serializer"
|
26
27
|
require_relative "acidic_job/serializers/range_serializer"
|
27
28
|
require_relative "acidic_job/serializers/recovery_point_serializer"
|
28
29
|
require_relative "acidic_job/serializers/worker_serializer"
|
29
|
-
require "active_job/serializers"
|
30
30
|
|
31
31
|
require_relative "acidic_job/rails"
|
32
32
|
|
33
33
|
module AcidicJob
|
34
|
-
::ActiveJob::Serializers.add_serializers(
|
35
|
-
Serializers::ExceptionSerializer,
|
36
|
-
Serializers::FinishedPointSerializer,
|
37
|
-
Serializers::JobSerializer,
|
38
|
-
Serializers::RangeSerializer,
|
39
|
-
Serializers::RecoveryPointSerializer,
|
40
|
-
Serializers::WorkerSerializer
|
41
|
-
)
|
42
34
|
end
|