skip webhook not found

This commit is contained in:
Pete Matsyburka
2025-12-03 13:20:52 +02:00
parent e92fc0d3e1
commit cba2d02990
12 changed files with 79 additions and 24 deletions
@@ -8,8 +8,13 @@ class SendTemplateCreatedWebhookRequestJob
MAX_ATTEMPTS = 10
def perform(params = {})
template = Template.find(params['template_id'])
webhook_url = WebhookUrl.find(params['webhook_url_id'])
template = Template.find_by(id: params['template_id'])
return unless template
webhook_url = WebhookUrl.find_by(id: params['webhook_url_id'])
return unless webhook_url
attempt = params['attempt'].to_i