diff --git a/faraday_agent_dispatcher/cli.py b/faraday_agent_dispatcher/cli.py index 45b0e242..a5e65e85 100644 --- a/faraday_agent_dispatcher/cli.py +++ b/faraday_agent_dispatcher/cli.py @@ -59,11 +59,11 @@ async def main(config_file): return 0 -@click.command("dispatcher") -@click.option("--config-file", default=None, help="Path to config ini file") -@click.option("--logs-folder", default="~", help="Path to logger folder") -def main_sync(config_file, logs_folder): - logging.reset_logger(logs_folder) +@click.command("faraday-dispatcher") +@click.option("-c", "--config-file", default=None, help="Path to config ini file") +@click.option("--logdir", default="~", help="Path to logger directory") +def main_sync(config_file, logdir): + logging.reset_logger(logdir) logger = logging.get_logger() try: exit_code = asyncio.run(main(config_file)) diff --git a/tests/integration/faraday/test_execution.py b/tests/integration/faraday/test_execution.py index 37cffaf8..ba242eb0 100644 --- a/tests/integration/faraday/test_execution.py +++ b/tests/integration/faraday/test_execution.py @@ -69,7 +69,7 @@ def test_execute_agent(): save_config(CONFIG_DIR) # Init dispatcher! - command = ['dispatcher', f'--config-file={CONFIG_DIR}', f'--logs-folder={LOGGER_DIR}'] + command = ['faraday-dispatcher', f'--config-file={CONFIG_DIR}', f'--logs-folder={LOGGER_DIR}'] p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) time.sleep(2) # If fails check time