Exception: Gritz::ForkGuard::Violation
- Inherits:
-
StandardError
- Object
- StandardError
- Gritz::ForkGuard::Violation
- Defined in:
- /home/runner/work/gritz/gritz/sources/gritz-core/lib/gritz/fork_guard.rb
Instance Attribute Summary collapse
- #klass ⇒ Object readonly
- #locations ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(klass, locations) ⇒ Violation
constructor
A new instance of Violation.
Constructor Details
#initialize(klass, locations) ⇒ Violation
Returns a new instance of Violation.
10 11 12 13 14 15 16 |
# File '/home/runner/work/gritz/gritz/sources/gritz-core/lib/gritz/fork_guard.rb', line 10 def initialize(klass, locations) @klass = klass @locations = locations super("gRPC object was created in the master process before fork.\n " \ "#{klass}.new\n#{locations.map { |location| " from #{location}" }.join("\n")}\n" \ "Fix: create it in an on_worker_boot hook.") end |
Instance Attribute Details
#klass ⇒ Object (readonly)
8 9 10 |
# File '/home/runner/work/gritz/gritz/sources/gritz-core/lib/gritz/fork_guard.rb', line 8 def klass @klass end |
#locations ⇒ Object (readonly)
8 9 10 |
# File '/home/runner/work/gritz/gritz/sources/gritz-core/lib/gritz/fork_guard.rb', line 8 def locations @locations end |