zeus 0.17.0 → 0.18.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 -1
- data/build/zeus-darwin-amd64 +0 -0
- data/build/zeus-darwin-arm64 +0 -0
- data/build/zeus-linux-386 +0 -0
- data/build/zeus-linux-amd64 +0 -0
- data/lib/zeus/load_tracking.rb +7 -3
- data/lib/zeus/rails.rb +19 -1
- data/lib/zeus/version.rb +1 -1
- data/lib/zeus.rb +7 -3
- data/zeus-0.17.0.gem +0 -0
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a6d45ec7899f6f3608e686da81cd443cffd058aca885759799185d2fc649fee
|
|
4
|
+
data.tar.gz: e5d033171d13916defb233555f17822611225e962d985b2f366015a9844eb20f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60355aaca66db85f170bf4e6191bd1c7313c87bcf8a30722490f905708f40d1c174a3cc381e57310c9da6b177b2c47c4a53d31b6730868508cc30e6606251537
|
|
7
|
+
data.tar.gz: f6dc19bb8a9f56dd9da996664bb488d481848a4a4178623bfe320bf74871ae9a884bde89eb9277cf8bc31690f291d392125d7ccfb05ca3ce88a47424485790b9
|
data/Gemfile.lock
CHANGED
data/build/zeus-darwin-amd64
CHANGED
|
Binary file
|
data/build/zeus-darwin-arm64
CHANGED
|
Binary file
|
data/build/zeus-linux-386
CHANGED
|
Binary file
|
data/build/zeus-linux-amd64
CHANGED
|
Binary file
|
data/lib/zeus/load_tracking.rb
CHANGED
|
@@ -53,15 +53,19 @@ module Zeus
|
|
|
53
53
|
private
|
|
54
54
|
|
|
55
55
|
def notify_features(features)
|
|
56
|
-
unless @feature_pipe
|
|
57
|
-
raise "Attempted to report features to Zeus when not running as part of a Zeus process"
|
|
58
|
-
end
|
|
56
|
+
return unless @feature_pipe
|
|
59
57
|
|
|
60
58
|
@feature_mutex.synchronize do
|
|
61
59
|
features.each do |t|
|
|
62
60
|
@feature_pipe.puts(t)
|
|
61
|
+
rescue Errno::EPIPE, Errno::EBADF, IOError
|
|
62
|
+
break
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
|
+
rescue Errno::EPIPE, Errno::EBADF, IOError
|
|
66
|
+
# Feature pipe is broken; skip tracking. This must not raise because
|
|
67
|
+
# notify_features is called from ensure blocks and an exception here
|
|
68
|
+
# would replace the original exception being propagated.
|
|
65
69
|
end
|
|
66
70
|
end
|
|
67
71
|
end
|
data/lib/zeus/rails.rb
CHANGED
|
@@ -9,6 +9,24 @@ ENV_PATH = File.expand_path('config/environment', RAILS_PATH)
|
|
|
9
9
|
BOOT_PATH = File.expand_path('config/boot', RAILS_PATH)
|
|
10
10
|
APP_PATH = File.expand_path('config/application', RAILS_PATH) unless defined? APP_PATH
|
|
11
11
|
|
|
12
|
+
# Set up Bundler's gem environment before loading any gems to prevent version
|
|
13
|
+
# conflicts (e.g. default gem versions conflicting with the app's Gemfile).
|
|
14
|
+
# We must do this before `require 'zeus'` so that gems like json/ostruct are
|
|
15
|
+
# activated at the Gemfile-pinned versions from the start.
|
|
16
|
+
#
|
|
17
|
+
# Bundler#setup may strip zeus's own lib path from $LOAD_PATH if zeus isn't
|
|
18
|
+
# listed in the app's Gemfile, so we capture it first and restore it after.
|
|
19
|
+
_zeus_lib_path = File.expand_path('../../', __FILE__)
|
|
20
|
+
begin
|
|
21
|
+
require 'bundler/setup'
|
|
22
|
+
rescue LoadError
|
|
23
|
+
# Bundler not installed; continue without it.
|
|
24
|
+
rescue => e
|
|
25
|
+
# Bundler setup failed (e.g. no Gemfile, gem conflict); continue without it.
|
|
26
|
+
ensure
|
|
27
|
+
$LOAD_PATH.unshift(_zeus_lib_path) unless $LOAD_PATH.include?(_zeus_lib_path)
|
|
28
|
+
end
|
|
29
|
+
|
|
12
30
|
require 'zeus'
|
|
13
31
|
|
|
14
32
|
def gem_is_bundled?(gem)
|
|
@@ -76,10 +94,10 @@ module Zeus
|
|
|
76
94
|
end
|
|
77
95
|
|
|
78
96
|
def boot
|
|
79
|
-
_monkeypatch_rake
|
|
80
97
|
$LOAD_PATH.unshift "./lib"
|
|
81
98
|
|
|
82
99
|
require BOOT_PATH
|
|
100
|
+
_monkeypatch_rake
|
|
83
101
|
# config/application.rb normally requires 'rails/all'.
|
|
84
102
|
# Some 'alternative' ORMs such as Mongoid give instructions to switch this require
|
|
85
103
|
# out for a list of railties, not including ActiveRecord.
|
data/lib/zeus/version.rb
CHANGED
data/lib/zeus.rb
CHANGED
|
@@ -187,12 +187,16 @@ module Zeus
|
|
|
187
187
|
|
|
188
188
|
def report_error_to_master(local, error)
|
|
189
189
|
str = "R:"
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
backtrace = error.backtrace || []
|
|
191
|
+
str << "#{backtrace[0] || '(no backtrace)'}: #{error.message} (#{error.class})\n"
|
|
192
|
+
backtrace[1..-1].each do |line|
|
|
192
193
|
str << "\tfrom #{line}\n"
|
|
193
194
|
end
|
|
194
195
|
str << "\0"
|
|
195
196
|
local.write str
|
|
197
|
+
rescue Exception
|
|
198
|
+
# If building or writing the error message itself fails, there is nothing
|
|
199
|
+
# we can do — the master will see EOF and mark the slave as crashed.
|
|
196
200
|
end
|
|
197
201
|
|
|
198
202
|
def run_action(socket, identifier)
|
|
@@ -204,7 +208,7 @@ module Zeus
|
|
|
204
208
|
end
|
|
205
209
|
|
|
206
210
|
socket.write "R:OK\0"
|
|
207
|
-
rescue => err
|
|
211
|
+
rescue Exception => err
|
|
208
212
|
report_error_to_master(socket, err)
|
|
209
213
|
raise
|
|
210
214
|
end
|
data/zeus-0.17.0.gem
ADDED
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zeus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.18.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Burke Libbey
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-02-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: method_source
|
|
@@ -91,6 +91,7 @@ files:
|
|
|
91
91
|
- spec/m_spec.rb
|
|
92
92
|
- spec/rails_spec.rb
|
|
93
93
|
- spec/zeus_spec.rb
|
|
94
|
+
- zeus-0.17.0.gem
|
|
94
95
|
- zeus.gemspec
|
|
95
96
|
homepage: https://github.com/burke/zeus
|
|
96
97
|
licenses:
|
|
@@ -111,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
111
112
|
- !ruby/object:Gem::Version
|
|
112
113
|
version: '0'
|
|
113
114
|
requirements: []
|
|
114
|
-
rubygems_version: 3.
|
|
115
|
+
rubygems_version: 3.5.22
|
|
115
116
|
signing_key:
|
|
116
117
|
specification_version: 4
|
|
117
118
|
summary: Zeus is an intelligent preloader for ruby applications. It allows normal
|