Skip to content

Commit

Permalink
Pairing: Better error message for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tilix4 committed Jan 6, 2025
1 parent af5a36c commit 14b83b1
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions services/processor/processor/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ def __init__(self):
)

try:
self.kitsu_login_email = (
ayon_api.get_secret(email_secret)["value"]
)
self.kitsu_login_password = (
ayon_api.get_secret(password_secret)["value"]
)
self.kitsu_login_email = ayon_api.get_secret(email_secret)[
"value"
]
self.kitsu_login_password = ayon_api.get_secret(
password_secret
)["value"]
except KeyError as e:
raise KitsuSettingsError(f"Secret `{e}` not found") from e

Expand Down Expand Up @@ -282,8 +282,11 @@ def get_pairing_list(self):
logging.info("get_pairing_list")
res = ayon_api.get(f"{self.entrypoint}/pairing")

assert res.status_code == 200, f"{self.entrypoint}/pairing failed"
# logging.info(f'get_pairing_list {res.status_code} {res.data}')
assert res.status_code == 200, (
"{self.entrypoint}/pairing failed. "
f" Status code '{res.status_code}': {res.detail}"
)

return res.data

def get_paired_ayon_project(self, kitsu_project_id: str) -> str | None:
Expand All @@ -302,7 +305,7 @@ def set_paired_ayon_project(
self.pairing_list.append(
{
"kitsuProjectId": kitsu_project_id,
"ayonProjectName": ayon_project_name
"ayonProjectName": ayon_project_name,
}
)

Expand Down Expand Up @@ -335,7 +338,7 @@ def start_processing(self):
)

if not job:
time.sleep(5)
time.sleep(10)
continue

src_job = ayon_api.get_event(job["dependsOn"])
Expand Down

0 comments on commit 14b83b1

Please sign in to comment.