mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-15 17:47:13 +00:00
Allow multiple services in "local restart" command
This commit is contained in:
parent
16819bd697
commit
e2a3a2d912
@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
|
||||
|
||||
## Unreleased
|
||||
|
||||
- [Feature] Restart multiple services with `local restart`
|
||||
- [Feature] Make it possible to easily reload openedx gunicorn process with `tutor local exec lms reload-gunicorn``
|
||||
- [Improvement] Rename lms/cms_worker to lms/cms-worker in local deployment
|
||||
- [Improvement] Add the management plugin to the rabbitmq container
|
||||
|
@ -62,18 +62,22 @@ restart all services. Note that this performs a 'docker-compose restart', so new
|
||||
may not be taken into account. It is useful for reloading settings, for instance. To
|
||||
fully stop the platform, use the 'reboot' command.""",
|
||||
)
|
||||
@click.argument("service")
|
||||
@click.argument("services", metavar="service", nargs=-1)
|
||||
@click.pass_obj
|
||||
def restart(context, service):
|
||||
def restart(context, services):
|
||||
config = tutor_config.load(context.root)
|
||||
command = ["restart"]
|
||||
if service == "openedx":
|
||||
if "all" in services:
|
||||
pass
|
||||
else:
|
||||
for service in services:
|
||||
if "openedx" == service:
|
||||
if config["ACTIVATE_LMS"]:
|
||||
command += ["lms", "lms-worker"]
|
||||
if config["ACTIVATE_CMS"]:
|
||||
command += ["cms", "cms-worker"]
|
||||
elif service != "all":
|
||||
command += [service]
|
||||
else:
|
||||
command.append(service)
|
||||
context.docker_compose(context.root, config, *command)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user