code: func (p *expiredAuthzPurger) deleteAuthorizations(work chan string, maxDPS int, parallelism int, table string, checkpointFile string) {
  	wg := new(sync.WaitGroup)
  	deleted := int64(0)
  	var ticker *time.Ticker
  	if maxDPS > 0 {
  		ticker = time.NewTicker(time.Duration(float64(time.Second) / float64(maxDPS)))
  	}
  	for i := 0; i < parallelism; i++ {
  		wg.Add(1)
  		go func() {
  			defer wg.Done()
  			for id := range work {
  				if ticker != nil {
  					<-ticker.C
  				}
  				err := deleteAuthorization(p.db, table, id)
  				if err != nil {
  					p.log.AuditErrf("Deleting %s: %s", id, err)
  				}
  				numDeleted := atomic.AddInt64(&deleted, 1)
  				// Only checkpoint every 1000 IDs in order to prevent unnecessary churn
  				// in the checkpoint file
  				if checkpointFile != "" && numDeleted%1000 == 0 {
  					err = saveCheckpoint(checkpointFile, id)
  					if err != nil {
  						p.log.AuditErrf("failed to checkpoint %q table at ID %q: %s", table, id, err)
  					}
  				}
  			}
  		}()
  	}
  
  	wg.Wait()
  	p.log.Infof("Deleted a total of %d expired authorizations from %s", deleted, table)
  }
docs: // deleteAuthorizations reads from the work channel and deletes each authorization
  // from either the pendingAuthorization or authz tables. If maxDPS is more than 0
  // it will throttle the number of DELETE statements it generates to the passed rate.