Skip to content

Commit

Permalink
fix: fix for missing republishing step after manual close
Browse files Browse the repository at this point in the history
  • Loading branch information
mherwig committed Dec 19, 2024
1 parent fa3e3c6 commit 770e620
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/republish/republish.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,12 @@ func RepublishPendingEvents(subscription *resource.SubscriptionResource, republi
throttler = createThrottler(subscription.Spec.Subscription.RedeliveriesPerSecond, string(subscription.Spec.Subscription.DeliveryType))
defer throttler.Release(context.Background())

cache.SetCancelStatus(subscriptionId, false)

var lastCursor any
for {
if cache.GetCancelStatus(subscriptionId) {
log.Info().Msgf("Republishing for subscription %s has been cancelled", subscriptionId)
cache.SetCancelStatus(subscriptionId, false)

return nil
}
Expand Down

0 comments on commit 770e620

Please sign in to comment.