mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-25 13:57:56 +02:00
Run exporter in goroutine
Use channel to pass data from exporter to importer
This commit is contained in:
parent
1ba165a631
commit
298697dcfc
7 changed files with 124 additions and 42 deletions
|
@ -64,3 +64,31 @@ type Love struct {
|
|||
RecordingMbid MBID
|
||||
RecordingMsid MBID
|
||||
}
|
||||
|
||||
type ListensList []Listen
|
||||
|
||||
func (l ListensList) Len() int {
|
||||
return len(l)
|
||||
}
|
||||
|
||||
func (l ListensList) Less(i, j int) bool {
|
||||
return l[i].ListenedAt.Unix() < l[j].ListenedAt.Unix()
|
||||
}
|
||||
|
||||
func (l ListensList) Swap(i, j int) {
|
||||
l[i], l[j] = l[j], l[i]
|
||||
}
|
||||
|
||||
type LovesList []Love
|
||||
|
||||
func (l LovesList) Len() int {
|
||||
return len(l)
|
||||
}
|
||||
|
||||
func (l LovesList) Less(i, j int) bool {
|
||||
return l[i].Created.Unix() < l[j].Created.Unix()
|
||||
}
|
||||
|
||||
func (l LovesList) Swap(i, j int) {
|
||||
l[i], l[j] = l[j], l[i]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue