func (o *Outboxer) StartCleanup(ctx context.Context) {
	ticker := time.NewTicker(o.cleanUpInterval)

	for {
		select {
		case <-ticker.C:
			if err := o.ds.Remove(ctx, o.cleanUpBefore, o.cleanUpBatchSize); err != nil {
				o.errChan <- err
			}
		case <-ctx.Done():
			return
		}
	}
}
// StartCleanup starts the cleanup process, that makes sure old messages are removed from the data store.
StartCleanup starts the cleanup process, that makes sure old messages are removed from the data store.
// StartCleanup starts the cleanup process that makes sure old messages are removed from the data store .
func (o *Outboxer) StartCleanup(ctx context.Context) {
	ticker := time.NewTicker(o.cleanUpInterval)
	for {
		select {
		case <-ticker.C:
			if err := o.ds.Remove(ctx, o.cleanUpBefore, o.cleanUpBatchSize); err != nil {
				o.errChan <- err
			}
		case <-ctx.Done():
			return
		}
	}
}
func ( o * Outboxer ) StartCleanup ( ctx context . Context ) { ticker := time . NewTicker ( o . cleanUpInterval ) for { select { case <- ticker . C : if err := o . ds . Remove ( ctx , o . cleanUpBefore , o . cleanUpBatchSize ) ; err != nil { o . errChan <- err } case <- ctx . Done ( ) : return } } }
StartCleanup starts the cleanup process, that makes sure old messages are removed from the data store.
StartCleanup starts the cleanup process that makes sure old messages are removed from the data store .