Skip to content

Commit 91ce5db

Browse files
committed
Add cancellation check in consumer to prevent further scheduling actions
1 parent 918e40b commit 91ce5db

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/kafka/consumer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ func (c *Consumer) processSessionChange(event models.DebeziumEvent) {
124124
return
125125
}
126126

127+
if after.Status == "CANCELLED" {
128+
log.Printf("Session %s was cancelled. No further scheduling actions will be taken.", after.ID)
129+
return
130+
}
131+
127132
// Check if on-sale time changed
128133
if after.SalesStartTime != before.SalesStartTime {
129134
onSaleTime := scheduler.MicrosecondsToTime(after.SalesStartTime)

0 commit comments

Comments
 (0)