solid_log-core 0.2.0 → 0.2.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: 29584710fa24106c9fd34cf056db068a4cc728790d891b036f58efca98f3f622
4
- data.tar.gz: ef9627f82cf2eda9f91be114bf583440a58b76e3722e4619ac6caff143ca128b
3
+ metadata.gz: 57666e95b9a34b0195d26534e72bd914038f1a695e4de7b7d7f6f45b34378466
4
+ data.tar.gz: b53d3cb3cf353a7346a71addaff504f3747348df7c1657d16900e43a8032b000
5
5
  SHA512:
6
- metadata.gz: 3078d64ae373365594bffebd66914e29569b76142a0a92dc52ed73592507def8a6abdee08505afc55643cc7c74e9732dc798419f95d89cad2fa2d7f87d36fe1c
7
- data.tar.gz: 2a7e1c672513f17cb133a737624d7b9c48b166aa507d38286b33a5e824a7697ae0d98e4e3d85e296d539986b42fce5bc6c4043b04f1a5d88a3ba90a8501c14a3
6
+ metadata.gz: ef71b13f98dad7c71afdd4af342e3c9fbb7c52e47160960f772f3726a74d530ca4b0e1ca1845143908303d4452c08077040f51c501dc0d5b6be99e34ced9751c
7
+ data.tar.gz: 1991d2cb34051a8d2ea0ca99033a1cd6d6965d9840ee03d0e58755adc1c5e2171db6ddc2927cb90a52bdca0a86424ac13a61d26ef6cc8ff8b81c5701c586c41c
@@ -49,11 +49,11 @@ Puma::Plugin.create do
49
49
  # Check if we're not in a Rails console or runner
50
50
  # Console and runner set DISABLE_SPRING or have IRB/Runner in ARGV
51
51
  return false if defined?(Rails::Console)
52
- return false if $PROGRAM_NAME.include?('rake')
53
- return false if $PROGRAM_NAME.include?('runner')
54
- return false if ARGV.include?('console')
55
- return false if ARGV.include?('runner')
56
- return false if ARGV.include?('c')
52
+ return false if $PROGRAM_NAME.include?("rake")
53
+ return false if $PROGRAM_NAME.include?("runner")
54
+ return false if ARGV.include?("console")
55
+ return false if ARGV.include?("runner")
56
+ return false if ARGV.include?("c")
57
57
 
58
58
  # If we made it here, we're likely in server mode
59
59
  true
@@ -89,7 +89,7 @@ Puma::Plugin.create do
89
89
  # Exponential backoff on error (max 60 seconds)
90
90
  # Prevents tight error loops
91
91
  backoff_time = [config.parse_interval * 2, 60].min
92
- $stderr.puts "[SolidLog Puma Plugin] Backing off for #{backoff_time}s" if ENV['SOLIDLOG_DEBUG']
92
+ $stderr.puts "[SolidLog Puma Plugin] Backing off for #{backoff_time}s" if ENV["SOLIDLOG_DEBUG"]
93
93
  sleep backoff_time
94
94
  end
95
95
  end
@@ -137,15 +137,15 @@ Puma::Plugin.create do
137
137
  "solid_log_new_entries",
138
138
  { entry_ids: entry_ids }
139
139
  )
140
- $stderr.puts "[SolidLog Puma Plugin] Broadcasted #{entry_ids.size} entries" if ENV['SOLIDLOG_DEBUG']
140
+ $stderr.puts "[SolidLog Puma Plugin] Broadcasted #{entry_ids.size} entries" if ENV["SOLIDLOG_DEBUG"]
141
141
  end
142
142
  rescue => e
143
143
  # Silent failure - broadcasting is optional
144
- $stderr.puts "[SolidLog Puma Plugin] Broadcast failed: #{e.message}" if ENV['SOLIDLOG_DEBUG']
144
+ $stderr.puts "[SolidLog Puma Plugin] Broadcast failed: #{e.message}" if ENV["SOLIDLOG_DEBUG"]
145
145
  end
146
146
 
147
147
  # Log processing stats (directly to STDERR to avoid recursion)
148
148
  def log_stats(stats)
149
- $stderr.puts "[SolidLog Puma Plugin] Processed #{stats[:processed]}, inserted #{stats[:inserted]}, errors #{stats[:errors]}" if ENV['SOLIDLOG_DEBUG']
149
+ $stderr.puts "[SolidLog Puma Plugin] Processed #{stats[:processed]}, inserted #{stats[:inserted]}, errors #{stats[:errors]}" if ENV["SOLIDLOG_DEBUG"]
150
150
  end
151
151
  end
@@ -37,7 +37,7 @@ module SolidLog
37
37
  return stats if raw_entries.empty?
38
38
 
39
39
  # Log to STDERR to avoid recursion (only in debug mode)
40
- $stderr.puts "[SolidLog::BatchParsingService] Processing #{raw_entries.size} raw entries" if ENV['SOLIDLOG_DEBUG']
40
+ $stderr.puts "[SolidLog::BatchParsingService] Processing #{raw_entries.size} raw entries" if ENV["SOLIDLOG_DEBUG"]
41
41
 
42
42
  # Get promoted fields cache (for performance)
43
43
  promoted_fields = get_promoted_fields_cache
@@ -95,7 +95,7 @@ module SolidLog
95
95
  Entry.insert_all(entries_to_insert)
96
96
  stats[:inserted] = entries_to_insert.size
97
97
  # Log to STDERR to avoid recursion (only in debug mode)
98
- $stderr.puts "[SolidLog::BatchParsingService] Inserted #{entries_to_insert.size} entries" if ENV['SOLIDLOG_DEBUG']
98
+ $stderr.puts "[SolidLog::BatchParsingService] Inserted #{entries_to_insert.size} entries" if ENV["SOLIDLOG_DEBUG"]
99
99
 
100
100
  # Broadcast new entry IDs for live tail
101
101
  new_entry_ids = Entry.where(raw_id: raw_ids).pluck(:id)
@@ -240,7 +240,7 @@ module SolidLog
240
240
  end
241
241
  rescue StandardError => e
242
242
  # Silent failure - broadcasting is optional (log to STDERR to avoid recursion)
243
- $stderr.puts "[SolidLog::BatchParsingService] Broadcast failed: #{e.message}" if ENV['SOLIDLOG_DEBUG']
243
+ $stderr.puts "[SolidLog::BatchParsingService] Broadcast failed: #{e.message}" if ENV["SOLIDLOG_DEBUG"]
244
244
  end
245
245
  end
246
246
  end
@@ -155,6 +155,6 @@ module SolidLog
155
155
  end
156
156
  end
157
157
  end
158
- end
158
+ end
159
159
  end
160
160
  end
@@ -142,6 +142,6 @@ module SolidLog
142
142
  SolidLog.logger&.info("Completed migration: #{filename}")
143
143
  end
144
144
  end
145
- end
145
+ end
146
146
  end
147
147
  end
@@ -1,5 +1,5 @@
1
1
  module SolidLog
2
2
  module Core
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
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.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Loman