This commit is contained in:
Eduard Urbach 2017-10-11 10:37:33 +02:00
parent 46a3715bae
commit 7892657362
3 changed files with 26 additions and 27 deletions

View File

@ -23,21 +23,20 @@ var colorPool = []*color.Color{
}
var jobs = map[string]time.Duration{
"forum-activity": 1 * time.Minute,
"active-users": 5 * time.Minute,
"anime-ratings": 10 * time.Minute,
"airing-anime": 10 * time.Minute,
"statistics": 15 * time.Minute,
"popular-anime": 20 * time.Minute,
"avatars": 1 * time.Hour,
"test": 1 * time.Hour,
"twist": 2 * time.Hour,
"search-index": 2 * time.Hour,
"refresh-episodes": 10 * time.Hour,
"refresh-track-titles": 10 * time.Hour,
"refresh-osu": 12 * time.Hour,
"sync-anime": 12 * time.Hour,
"sync-shoboi": 24 * time.Hour,
"forum-activity": 1 * time.Minute,
"active-users": 5 * time.Minute,
"anime-ratings": 10 * time.Minute,
"airing-anime": 10 * time.Minute,
"statistics": 15 * time.Minute,
"popular-anime": 20 * time.Minute,
"avatars": 1 * time.Hour,
"test": 1 * time.Hour,
"twist": 2 * time.Hour,
"search-index": 2 * time.Hour,
"refresh-episodes": 10 * time.Hour,
"refresh-osu": 12 * time.Hour,
"sync-anime": 12 * time.Hour,
"sync-shoboi": 24 * time.Hour,
}
func main() {

View File

@ -24,14 +24,14 @@ func main() {
}
func sync(track *arn.SoundTrack) {
for _, media := range track.Media {
media.RefreshMetaData()
println(media.Service, media.Title)
}
// for _, media := range track.Media {
// media.RefreshMetaData()
// println(media.Service, media.Title)
// }
err := track.Save()
// err := track.Save()
if err != nil {
panic(err)
}
// if err != nil {
// panic(err)
// }
}

View File

@ -37,23 +37,23 @@ func TestRoutes(t *testing.T) {
func TestInterfaceImplementations(t *testing.T) {
// API interfaces
var creatable = reflect.TypeOf((*api.Creatable)(nil)).Elem()
var updatable = reflect.TypeOf((*api.Updatable)(nil)).Elem()
var editable = reflect.TypeOf((*api.Editable)(nil)).Elem()
var actionable = reflect.TypeOf((*api.Actionable)(nil)).Elem()
var collection = reflect.TypeOf((*api.Collection)(nil)).Elem()
// Required interface implementations
var interfaceImplementations = map[string][]reflect.Type{
"User": []reflect.Type{
updatable,
editable,
},
"Thread": []reflect.Type{
creatable,
updatable,
editable,
actionable,
},
"Post": []reflect.Type{
creatable,
updatable,
editable,
actionable,
},
"SoundTrack": []reflect.Type{