Makes request rate limited per second, not microseconds

This commit is contained in:
2017-09-23 16:45:38 +02:00
parent b0eefe8de3
commit 91765d2c84

View File

@@ -78,7 +78,7 @@ func newAppData(opts Options) (*appData, error) {
res.db = OpenAlbumDatabase(filepath.Join(basepath, "db"))
res.getter = &AlbumDescriptionGetter{
getter: NewRateLimitedGetter(10, 10),
getter: NewRateLimitedGetter(10, 10*time.Second),
}
res.cover = NewAlbumCoverCache(filepath.Join(basepath, "covers"), opts.MaxRequests, opts.RequestWindow)