Class: Thin::Commands::Cluster::Start
- Inherits:
-
Base
show all
- Defined in:
- lib/thin/commands/cluster/start.rb
Instance Attribute Summary
Attributes inherited from Base
#config, #trace
#args
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
config_attributes
command_name, #initialize
Constructor Details
This class inherits a constructor from Thin::Command
Class Method Details
.detailed_help ⇒ Object
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/thin/commands/cluster/start.rb', line 22
def self.detailed_help
<<-EOF
usage: thin_cluster start [options]
Start multiple servers (--servers) starting on port --port.
One pid file and log file will be created for each.
By default 3 servers will be started:
0.0.0.0:5000 pid-file=tmp/pids/thin.5000.pid log-file=log/thin.5000.log
0.0.0.0:5001 pid-file=tmp/pids/thin.5001.pid log-file=log/thin.5001.log
0.0.0.0:5002 pid-file=tmp/pids/thin.5002.pid log-file=log/thin.5002.log
Use 'thin_cluster config' to create a config file and use
it with the --config option.
EOF
end
|
.help ⇒ Object
18
19
20
|
# File 'lib/thin/commands/cluster/start.rb', line 18
def self.help
"Starts a bunch of servers"
end
|
Instance Method Details
#run ⇒ Object
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/thin/commands/cluster/start.rb', line 3
def run
load_from_config
cluster = Thin::Cluster.new(cwd, address, port, servers)
cluster.environment = environment
cluster.log_file = log_file
cluster.pid_file = pid_file
cluster.trace = trace
cluster.user = user
cluster.group = group
cluster.start
end
|