Add deprecation warning to scale command

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2017-04-26 15:00:41 -07:00
parent 2ba4e5e8ec
commit 28b868848d
1 changed files with 8 additions and 0 deletions

View File

@ -764,6 +764,9 @@ class TopLevelCommand(object):
$ docker-compose scale web=2 worker=3 $ docker-compose scale web=2 worker=3
This command is deprecated. Use the up command with the `--scale` flag
instead.
Usage: scale [options] [SERVICE=NUM...] Usage: scale [options] [SERVICE=NUM...]
Options: Options:
@ -777,6 +780,11 @@ class TopLevelCommand(object):
'The scale command is incompatible with the v2.2 format. ' 'The scale command is incompatible with the v2.2 format. '
'Use the up command with the --scale flag instead.' 'Use the up command with the --scale flag instead.'
) )
else:
log.warn(
'The scale command is deprecated. '
'Use the up command with the --scale flag instead.'
)
for service_name, num in parse_scale_args(options['SERVICE=NUM']).items(): for service_name, num in parse_scale_args(options['SERVICE=NUM']).items():
self.project.get_service(service_name).scale(num, timeout=timeout) self.project.get_service(service_name).scale(num, timeout=timeout)