mirror of
https://github.com/genuinetools/reg.git
synced 2024-06-28 10:24:17 -04:00
throttle
Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
parent
ba1c370d40
commit
0ce468721d
|
@ -301,6 +301,9 @@ func createStaticIndex(r *registry.Registry, staticDir, clairURI string) error {
|
|||
go func(repo, tag string) {
|
||||
defer wg.Done()
|
||||
|
||||
throttle := time.Tick(time.Duration(1e6/int(3)) * time.Microsecond)
|
||||
<-throttle
|
||||
|
||||
logrus.Infof("creating vulns.txt for %s:%s", repo, tag)
|
||||
|
||||
if err := createVulnStaticPage(r, staticDir, clairURI, repo, tag); err != nil {
|
||||
|
|
Loading…
Reference in a new issue