mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-28 18:02:41 +02:00
📝 — Improve help messages
This commit is contained in:
parent
8b3a8dd153
commit
cf4441be29
1 changed files with 11 additions and 7 deletions
|
@ -90,7 +90,8 @@ def agent(server_url, auth, max_tasks, wait_time, log_level):
|
|||
@click.option(
|
||||
"--config",
|
||||
default="config.yaml",
|
||||
help="Path the the configuration file",
|
||||
help="Path of the configuration file. "
|
||||
"If ARGOS_YAML_FILE environment variable is set, its value will be used instead.",
|
||||
envvar="ARGOS_YAML_FILE",
|
||||
)
|
||||
@click.option("--reload", is_flag=True, help="Enable hot reloading")
|
||||
|
@ -132,7 +133,8 @@ def validate_max_results(ctx, param, value):
|
|||
@click.option(
|
||||
"--config",
|
||||
default="config.yaml",
|
||||
help="Path the the configuration file",
|
||||
help="Path of the configuration file. "
|
||||
"If ARGOS_YAML_FILE environment variable is set, its value will be used instead.",
|
||||
envvar="ARGOS_YAML_FILE",
|
||||
)
|
||||
@coroutine
|
||||
|
@ -156,16 +158,17 @@ async def cleandb(max_results, max_lock_seconds, config):
|
|||
click.echo(f"{updated} locks released")
|
||||
|
||||
|
||||
@server.command()
|
||||
@server.command(short_help="Load or reload tasks’ configuration")
|
||||
@click.option(
|
||||
"--config",
|
||||
default="config.yaml",
|
||||
help="Path the the configuration file",
|
||||
help="Path of the configuration file. "
|
||||
"If ARGOS_YAML_FILE environment variable is set, its value will be used instead.",
|
||||
envvar="ARGOS_YAML_FILE",
|
||||
)
|
||||
@coroutine
|
||||
async def reload_config(config):
|
||||
"""Read tasks configuration and add/delete tasks in database if needed"""
|
||||
"""Read tasks’ configuration and add/delete tasks in database if needed"""
|
||||
# The imports are made here otherwise the agent will need server configuration files.
|
||||
from argos.server import queries
|
||||
from argos.server.main import get_application, read_config
|
||||
|
@ -188,7 +191,8 @@ async def reload_config(config):
|
|||
@click.option(
|
||||
"--config",
|
||||
default="config.yaml",
|
||||
help="Path the the configuration file",
|
||||
help="Path of the configuration file. "
|
||||
"If ARGOS_YAML_FILE environment variable is set, its value will be used instead.",
|
||||
envvar="ARGOS_YAML_FILE",
|
||||
)
|
||||
@coroutine
|
||||
|
@ -206,7 +210,7 @@ async def migrate(config):
|
|||
command.upgrade(alembic_cfg, "head")
|
||||
|
||||
|
||||
@server.command()
|
||||
@server.command(short_help="Generate a token for agents")
|
||||
@coroutine
|
||||
async def generate_token():
|
||||
"""Generate a token, which can be used as an agent’s authentication token.
|
||||
|
|
Loading…
Reference in a new issue