On Thu, Nov 12, 2020 at 03:15:42PM +0800, Yu Chuan wrote:
On Thu, Nov 12, 2020 at 11:50:14AM +0800, Xiao Shenwei wrote:
Usage: multi-docker -n -c -q -n, --name HOSTNAME_PREFIX format: $tbox_group.$HOSTNAME -c, --count count how many containers do you need -q, --queues queues separated by "," -h, --help show this message
If there is no value in these three params, do these vars have default values? Have you considered this situation?
yes
if ARGV.size.zero? puts options
- exit
- exit 1
at least one
end
options.parse!(ARGV)
-hostname = opt['hostname_prefix'] || 'dc-1g' +hostname = opt['hostname_prefix'] || "dc-1g.#{ENV['HOSTNAME']}" nr_container = opt['nr_container'] || 1
default value
Thanks, Shenwei
+queues = opt['queues'] || "dc-1g.#{ENV['HOSTNAME']}"
-pids = multi_docker(hostname, nr_container) +pids = multi_docker(hostname, nr_container, queues) save_pid pids -- 2.23.0