diff --git a/services/processor/processor/processor.py b/services/processor/processor/processor.py index ccbd887..c727ad0 100644 --- a/services/processor/processor/processor.py +++ b/services/processor/processor/processor.py @@ -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 @@ -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: @@ -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, } ) @@ -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"])