Class: Exekutor::Internal::CLI::Manager::DefaultPidFileValue
- Inherits:
-
DefaultOptionValue
- Object
- DefaultOptionValue
- Exekutor::Internal::CLI::Manager::DefaultPidFileValue
- Defined in:
- lib/exekutor/internal/cli/manager.rb
Overview
The default value for the pid file
Instance Method Summary collapse
-
#for_identifier(identifier) ⇒ String
The path to the default pidfile of the worker with the specified identifier.
-
#initialize ⇒ DefaultPidFileValue
constructor
A new instance of DefaultPidFileValue.
Methods inherited from DefaultOptionValue
Constructor Details
#initialize ⇒ DefaultPidFileValue
Returns a new instance of DefaultPidFileValue.
306 307 308 |
# File 'lib/exekutor/internal/cli/manager.rb', line 306 def initialize super("tmp/pids/exekutor[.%{identifier}].pid") end |
Instance Method Details
#for_identifier(identifier) ⇒ String
Returns the path to the default pidfile of the worker with the specified identifier.
312 313 314 315 316 317 318 |
# File 'lib/exekutor/internal/cli/manager.rb', line 312 def for_identifier(identifier) if identifier.nil? || identifier.empty? # rubocop:disable Rails/Blank – Rails is not loaded here "tmp/pids/exekutor.pid" else "tmp/pids/exekutor.#{identifier}.pid" end end |