Add some stress-test data
This commit is contained in:
parent
3e7a3a2f3b
commit
ba87b943ea
8
download/download_notestdata.go
Normal file
8
download/download_notestdata.go
Normal file
@ -0,0 +1,8 @@
|
||||
//go:build !testdata
|
||||
|
||||
package download
|
||||
|
||||
import "github.com/tardisx/gropple/config"
|
||||
|
||||
func (m *Manager) AddStressTestData(c *config.ConfigService) {
|
||||
}
|
28
download/download_testdata.go
Normal file
28
download/download_testdata.go
Normal file
@ -0,0 +1,28 @@
|
||||
//go:build testdata
|
||||
|
||||
package download
|
||||
|
||||
import "github.com/tardisx/gropple/config"
|
||||
|
||||
func (m *Manager) AddStressTestData(c *config.ConfigService) {
|
||||
|
||||
urls := []string{
|
||||
"https://www.youtube.com/watch?v=qG_rRkuGBW8",
|
||||
"https://www.youtube.com/watch?v=ZUzhZpQAU40",
|
||||
"https://www.youtube.com/watch?v=kVxM3eRWGak",
|
||||
"https://www.youtube.com/watch?v=pl-y9869y0w",
|
||||
"https://vimeo.com/783453809",
|
||||
"https://www.youtube.com/watch?v=Uw4NEPE4l3A",
|
||||
"https://www.youtube.com/watch?v=2RF0lcTuuYE",
|
||||
"https://www.youtube.com/watch?v=lymwNQY0dus",
|
||||
"https://www.youtube.com/watch?v=NTc-I4Z_duc",
|
||||
"https://www.youtube.com/watch?v=wNSm1TJ84Ac",
|
||||
"https://vimeo.com/786570322",
|
||||
}
|
||||
for _, u := range urls {
|
||||
d := NewDownload(u, c.Config)
|
||||
d.DownloadProfile = *c.Config.ProfileCalled("standard video")
|
||||
m.AddDownload(d)
|
||||
m.Queue(d)
|
||||
}
|
||||
}
|
20
main.go
20
main.go
@ -110,25 +110,7 @@ func main() {
|
||||
// start downloading queued downloads when slots available, and clean up
|
||||
// old entries
|
||||
go dm.ManageQueue()
|
||||
|
||||
urls := []string{
|
||||
// "https://www.youtube.com/watch?v=qG_rRkuGBW8",
|
||||
// "https://www.youtube.com/watch?v=ZUzhZpQAU40",
|
||||
// "https://www.youtube.com/watch?v=kVxM3eRWGak",
|
||||
// "https://www.youtube.com/watch?v=pl-y9869y0w",
|
||||
// "https://www.youtube.com/watch?v=Uw4NEPE4l3A",
|
||||
// "https://www.youtube.com/watch?v=6tIsT57_nS0",
|
||||
// "https://www.youtube.com/watch?v=2RF0lcTuuYE",
|
||||
// "https://www.youtube.com/watch?v=lymwNQY0dus",
|
||||
// "https://www.youtube.com/watch?v=NTc-I4Z_duc",
|
||||
// "https://www.youtube.com/watch?v=wNSm1TJ84Ac",
|
||||
}
|
||||
for _, u := range urls {
|
||||
d := download.NewDownload(u, configService.Config)
|
||||
d.DownloadProfile = *configService.Config.ProfileCalled("standard video")
|
||||
dm.AddDownload(d)
|
||||
dm.Queue(d)
|
||||
}
|
||||
dm.AddStressTestData(configService)
|
||||
|
||||
log.Printf("Visit %s for details on installing the bookmarklet and to check status", configService.Config.Server.Address)
|
||||
log.Fatal(srv.ListenAndServe())
|
||||
|
Loading…
x
Reference in New Issue
Block a user