summaryrefslogtreecommitdiff
path: root/system/db/init.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-18 13:57:39 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-18 13:57:39 -0700
commit16230b04aa14c88873eaf4c7b9596a7f850df0e9 (patch)
treeb84dd88a6b6747e719f6650cdd830636416ee9e0 /system/db/init.go
parentaef933f144a89e947d8ccdae8e085eed221e2bdd (diff)
implement Sort on all content types by Timestamp, DESC (latest to oldest) - run in goroutine on db.Init() as well as any time content is saved via SetContent
Diffstat (limited to 'system/db/init.go')
-rw-r--r--system/db/init.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/system/db/init.go b/system/db/init.go
index 5806622..399a1e2 100644
--- a/system/db/init.go
+++ b/system/db/init.go
@@ -71,9 +71,11 @@ func Init() {
}
// sort all content into type_sorted buckets
- for t := range content.Types {
- go SortContent(t + "_sorted")
- }
+ go func() {
+ for t := range content.Types {
+ SortContent(t + "_sorted")
+ }
+ }()
}