Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions apps/api/plane/bgtasks/webhook_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def get_issue_prefetches():
]



def save_webhook_log(
webhook: Webhook,
request_method: str,
Expand All @@ -98,10 +97,9 @@ def save_webhook_log(
retry_count: int,
event_type: str,
) -> None:

# webhook_logs
mongo_collection = MongoConnection.get_collection("webhook_logs")

log_data = {
"workspace_id": str(webhook.workspace_id),
"webhook": str(webhook.id),
Expand All @@ -123,7 +121,7 @@ def save_webhook_log(
logger.info("Webhook log saved successfully to mongo")
mongo_save_success = True
except Exception as e:
log_exception(e)
log_exception(e, warning=True)
logger.error(f"Failed to save webhook log: {e}")
mongo_save_success = False

Expand All @@ -134,7 +132,7 @@ def save_webhook_log(
WebhookLog.objects.create(**log_data)
logger.info("Webhook log saved successfully to database")
except Exception as e:
log_exception(e)
log_exception(e, warning=True)
logger.error(f"Failed to save webhook log: {e}")


Expand Down Expand Up @@ -244,7 +242,7 @@ def send_webhook_deactivation_email(webhook_id: str, receiver_id: str, current_s
msg.send()
logger.info("Email sent successfully.")
except Exception as e:
log_exception(e)
log_exception(e, warning=True)
logger.error(f"Failed to send email: {e}")


Expand Down
Loading