diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index d5404e06..2107010f 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -4,7 +4,7 @@ on: branches: - main schedule: - - cron: '0 * * * *' + - cron: '0 0 */7 * *' jobs: build: diff --git a/webnovel.py b/webnovel.py index 0b41483c..05cd81ea 100644 --- a/webnovel.py +++ b/webnovel.py @@ -71,7 +71,7 @@ def __request(self, path: str, payload: Optional[dict] = None) -> Response: message += f"\nAttempt {attempt}/{self.__MAX_RETRIES}" if sleep_time is not None: - message += f"\nRetrying in {sleep_time} seconds" + message += f"\nRetrying in {sleep_time} minutes" self.__send_webhook( content=f":warning: {message}", @@ -80,7 +80,7 @@ def __request(self, path: str, payload: Optional[dict] = None) -> Response: tqdm.write(message) if sleep_time is not None: - time.sleep(sleep_time) + time.sleep(sleep_time*60) message = f"Failed to get response after {self.__MAX_RETRIES} tries" self.__send_webhook(f":warning::warning::warning: {message}")