mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Add listen-only flag to sync
This commit is contained in:
parent
925ea3fe93
commit
c5dd4d21ee
1 changed files with 18 additions and 9 deletions
|
|
@ -124,13 +124,6 @@ def push_to_zou(login, password):
|
||||||
|
|
||||||
|
|
||||||
@cli_main.command()
|
@cli_main.command()
|
||||||
@click.option(
|
|
||||||
"-prj",
|
|
||||||
"--project",
|
|
||||||
multiple=True,
|
|
||||||
default=[""],
|
|
||||||
help="Sync specific kitsu projects"
|
|
||||||
)
|
|
||||||
@click.option(
|
@click.option(
|
||||||
"-l",
|
"-l",
|
||||||
"--login",
|
"--login",
|
||||||
|
|
@ -143,16 +136,32 @@ def push_to_zou(login, password):
|
||||||
envvar="KITSU_PWD",
|
envvar="KITSU_PWD",
|
||||||
help="Password for kitsu username"
|
help="Password for kitsu username"
|
||||||
)
|
)
|
||||||
def sync_service(login, password, project):
|
@click.option(
|
||||||
|
"-prj",
|
||||||
|
"--project",
|
||||||
|
multiple=True,
|
||||||
|
default=[],
|
||||||
|
help="Sync specific kitsu projects"
|
||||||
|
)
|
||||||
|
@click.option(
|
||||||
|
"-lo",
|
||||||
|
"--listen_only/--listen-only",
|
||||||
|
default=False,
|
||||||
|
help="Listen to events only without any syncing"
|
||||||
|
)
|
||||||
|
def sync_service(login, password, project, listen_only):
|
||||||
"""Synchronize openpype database from Zou sever database.
|
"""Synchronize openpype database from Zou sever database.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
login (str): Kitsu user login
|
login (str): Kitsu user login
|
||||||
password (str): Kitsu user password
|
password (str): Kitsu user password
|
||||||
project (str): specific kitsu projects
|
project (str): specific kitsu projects
|
||||||
|
listen_only (bool): run listen only without any syncing
|
||||||
"""
|
"""
|
||||||
from .utils.update_op_with_zou import sync_all_projects
|
from .utils.update_op_with_zou import sync_all_projects
|
||||||
from .utils.sync_service import start_listeners
|
from .utils.sync_service import start_listeners
|
||||||
|
|
||||||
sync_all_projects(login, password, filter_projects=project)
|
if not listen_only:
|
||||||
|
sync_all_projects(login, password, filter_projects=project)
|
||||||
|
|
||||||
start_listeners(login, password)
|
start_listeners(login, password)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue