mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 10:05:29 -05:00
* asyncio.get_event_loop() is deprecated in 3.10, stop using it https://docs.python.org/3.10/library/asyncio-eventloop.html#asyncio.get_event_loop > Deprecated since version 3.10: Deprecation warning is emitted if there is no running event loop. In future Python releases, this function will be an alias of get_running_loop(). * black
15 lines
521 B
Python
15 lines
521 B
Python
import click
|
|
|
|
from chia.util.service_groups import all_groups
|
|
|
|
|
|
@click.command("start", short_help="Start service groups")
|
|
@click.option("-r", "--restart", is_flag=True, type=bool, help="Restart running services")
|
|
@click.argument("group", type=click.Choice(list(all_groups())), nargs=-1, required=True)
|
|
@click.pass_context
|
|
def start_cmd(ctx: click.Context, restart: bool, group: str) -> None:
|
|
import asyncio
|
|
from .start_funcs import async_start
|
|
|
|
asyncio.run(async_start(ctx.obj["root_path"], group, restart))
|