mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 12:59:18 +08:00
chore: add more logs
This commit is contained in:
parent
14afad0deb
commit
dd94f81272
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user