Skip to content

Commit

Permalink
If the sent date is null, we should not care about webhook creation d…
Browse files Browse the repository at this point in the history
…ate vs profile last modified
  • Loading branch information
amontenegro committed Sep 14, 2023
1 parent 38a14a3 commit 7e78338
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class WebhookEntity extends BaseEntity<WebhookEntityPk> {
+ "JOIN client_details c ON c.client_details_id = w.client_details_id AND c.deactivated_date is null AND c.webhooks_enabled = 'true'"
+ " WHERE w.enabled = 'true' "
+ " AND w.failed_attempt_count < :maxAttemptCount "
+ " AND (w.profile_last_modified >= w.last_sent OR (w.last_sent IS NULL AND w.profile_last_modified >= w.date_created))"
+ " AND (w.last_sent IS NULL OR w.profile_last_modified >= w.last_sent)"
+ " AND (w.failed_attempt_count = 0 OR (unix_timestamp(w.last_failed) + w.failed_attempt_count * :retryDelayMinutes * 60) < unix_timestamp(now()))";

@Override
Expand Down

0 comments on commit 7e78338

Please sign in to comment.