solid_log-core 0.2.1 → 0.2.2

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: 57666e95b9a34b0195d26534e72bd914038f1a695e4de7b7d7f6f45b34378466
4
- data.tar.gz: b53d3cb3cf353a7346a71addaff504f3747348df7c1657d16900e43a8032b000
3
+ metadata.gz: a18b9a3fc6d70a9f0d2b214d8f627d674eb0cf3336e0c8eb15a3ce87ab958917
4
+ data.tar.gz: 9e9b3fc9217af124bafddc4c372a01e8a280ae7431aeafa50a757ab39d6186c8
5
5
  SHA512:
6
- metadata.gz: ef71b13f98dad7c71afdd4af342e3c9fbb7c52e47160960f772f3726a74d530ca4b0e1ca1845143908303d4452c08077040f51c501dc0d5b6be99e34ced9751c
7
- data.tar.gz: 1991d2cb34051a8d2ea0ca99033a1cd6d6965d9840ee03d0e58755adc1c5e2171db6ddc2927cb90a52bdca0a86424ac13a61d26ef6cc8ff8b81c5701c586c41c
6
+ metadata.gz: 3e6d28fb7fea4b17bd84da22c266fd2452de3d569ef9d51a61a103cf01375e255b736b860a49696b4795051f95e3321fdae16762d676ceae7bf1dd501ae5057b
7
+ data.tar.gz: 5d1c3797c72cdfeeb96b8063a828f767a753954b15034a10fbf1d37a4954a720833e9bbef3387648819a87f161fbad143f21ef228249bdf7ca972fadfd8f91ae
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SolidLog
4
+ module Core
5
+ module Jobs
6
+ # Conditionally inherit from ActiveJob if available
7
+ # This allows the same job class to work in Rails apps AND solid_log-service
8
+ if defined?(ActiveJob::Base)
9
+ BaseJob = ActiveJob::Base
10
+ else
11
+ # Plain Ruby class when ActiveJob not available
12
+ BaseJob = Class.new do
13
+ def self.queue_as(*_args)
14
+ # No-op when not using ActiveJob
15
+ end
16
+
17
+ def self.perform_later(*args, **kwargs)
18
+ # Synchronous execution when ActiveJob not available
19
+ new.perform(*args, **kwargs)
20
+ end
21
+
22
+ def self.perform_now(*args, **kwargs)
23
+ new.perform(*args, **kwargs)
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -3,22 +3,6 @@
3
3
  module SolidLog
4
4
  module Core
5
5
  module Jobs
6
- # Conditionally inherit from ActiveJob if available
7
- if defined?(ActiveJob::Base)
8
- BaseJob = ActiveJob::Base
9
- else
10
- # Plain Ruby class when ActiveJob not available
11
- BaseJob = Class.new do
12
- def self.queue_as(*); end # No-op when not using ActiveJob
13
- def self.perform_later(*args, **kwargs)
14
- new.perform(*args, **kwargs)
15
- end
16
- def self.perform_now(*args, **kwargs)
17
- new.perform(*args, **kwargs)
18
- end
19
- end
20
- end
21
-
22
6
  class CacheCleanupJob < BaseJob
23
7
  queue_as :default
24
8
 
@@ -3,22 +3,6 @@
3
3
  module SolidLog
4
4
  module Core
5
5
  module Jobs
6
- # Conditionally inherit from ActiveJob if available
7
- if defined?(ActiveJob::Base)
8
- BaseJob = ActiveJob::Base
9
- else
10
- # Plain Ruby class when ActiveJob not available
11
- BaseJob = Class.new do
12
- def self.queue_as(*); end # No-op when not using ActiveJob
13
- def self.perform_later(*args, **kwargs)
14
- new.perform(*args, **kwargs)
15
- end
16
- def self.perform_now(*args, **kwargs)
17
- new.perform(*args, **kwargs)
18
- end
19
- end
20
- end
21
-
22
6
  class FieldAnalysisJob < BaseJob
23
7
  queue_as :default
24
8
 
@@ -3,28 +3,6 @@
3
3
  module SolidLog
4
4
  module Core
5
5
  module Jobs
6
- # Conditionally inherit from ActiveJob if available
7
- # This allows the same job class to work in Rails apps AND solid_log-service
8
- if defined?(ActiveJob::Base)
9
- BaseJob = ActiveJob::Base
10
- else
11
- # Plain Ruby class when ActiveJob not available
12
- BaseJob = Class.new do
13
- def self.queue_as(*_args)
14
- # No-op when not using ActiveJob
15
- end
16
-
17
- def self.perform_later(*args, **kwargs)
18
- # Synchronous execution when ActiveJob not available
19
- new.perform(*args, **kwargs)
20
- end
21
-
22
- def self.perform_now(*args, **kwargs)
23
- new.perform(*args, **kwargs)
24
- end
25
- end
26
- end
27
-
28
6
  # ParseJob processes batches of unparsed raw log entries.
29
7
  #
30
8
  # This job can be used in three contexts:
@@ -3,22 +3,6 @@
3
3
  module SolidLog
4
4
  module Core
5
5
  module Jobs
6
- # Conditionally inherit from ActiveJob if available
7
- if defined?(ActiveJob::Base)
8
- BaseJob = ActiveJob::Base
9
- else
10
- # Plain Ruby class when ActiveJob not available
11
- BaseJob = Class.new do
12
- def self.queue_as(*); end # No-op when not using ActiveJob
13
- def self.perform_later(*args, **kwargs)
14
- new.perform(*args, **kwargs)
15
- end
16
- def self.perform_now(*args, **kwargs)
17
- new.perform(*args, **kwargs)
18
- end
19
- end
20
- end
21
-
22
6
  class RetentionJob < BaseJob
23
7
  queue_as :default
24
8
 
@@ -1,5 +1,5 @@
1
1
  module SolidLog
2
2
  module Core
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
@@ -31,6 +31,7 @@ require "solid_log/core/services/migration_runner"
31
31
  require "solid_log/core/services/batch_parsing_service"
32
32
 
33
33
  # Jobs
34
+ require "solid_log/core/jobs/base_job"
34
35
  require "solid_log/core/jobs/parse_job"
35
36
  require "solid_log/core/jobs/retention_job"
36
37
  require "solid_log/core/jobs/cache_cleanup_job"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid_log-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Loman
@@ -201,6 +201,7 @@ files:
201
201
  - lib/solid_log/core/client/lograge_formatter.rb
202
202
  - lib/solid_log/core/client/retry_handler.rb
203
203
  - lib/solid_log/core/configuration.rb
204
+ - lib/solid_log/core/jobs/base_job.rb
204
205
  - lib/solid_log/core/jobs/cache_cleanup_job.rb
205
206
  - lib/solid_log/core/jobs/field_analysis_job.rb
206
207
  - lib/solid_log/core/jobs/parse_job.rb