From dd94f81272a38887264a0bb5c9fea2065c52800c Mon Sep 17 00:00:00 2001 From: hj24 Date: Mon, 26 Jan 2026 13:59:38 +0800 Subject: [PATCH] chore: add more logs --- api/services/billing_service.py | 2 +- api/tasks/delete_account_task.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api/services/billing_service.py b/api/services/billing_service.py index 623a63f105..0d12aacd98 100644 --- a/api/services/billing_service.py +++ b/api/services/billing_service.py @@ -143,7 +143,7 @@ class BillingService: raise ValueError("Invalid arguments.") if method == "POST" and response.status_code != httpx.codes.OK: raise ValueError(f"Unable to send request to {url}. Please try again later or contact support.") - logger.info("billing_service: _send_request: response: %s", response.json()) + logger.info("billing_service: %s _send_request: response: %s", method, response.json()) return response.json() @staticmethod diff --git a/api/tasks/delete_account_task.py b/api/tasks/delete_account_task.py index ecf6f9cb39..ee61c52f2c 100644 --- a/api/tasks/delete_account_task.py +++ b/api/tasks/delete_account_task.py @@ -14,10 +14,13 @@ logger = logging.getLogger(__name__) @shared_task(queue="dataset") def delete_account_task(account_id): with session_factory.create_session() as session: + logger.info("delete_account_task: account_id: %s", account_id) account = session.query(Account).where(Account.id == account_id).first() try: if dify_config.BILLING_ENABLED: + logger.info("delete_account_task: before delete_account: %s", account_id) BillingService.delete_account(account_id) + logger.info("delete_account_task: after delete_account: %s", account_id) except Exception: logger.exception("Failed to delete account %s from billing service.", account_id) raise @@ -27,3 +30,4 @@ def delete_account_task(account_id): return # send success email send_deletion_success_task.delay(account.email) + logger.info("delete_account_task: delete_account successfully: %s", account_id)