summaryrefslogtreecommitdiff
path: root/system/db/content.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-04-13 13:13:13 -0700
committerSteve Manuel <nilslice@gmail.com>2017-04-13 13:13:13 -0700
commit167cbd869a26e2798ae56653c34eeb65d16e1d92 (patch)
tree35315f3b6e2952cc814710cae90964eaa9efc701 /system/db/content.go
parent10ede97c593fe229745ae37175ec465c55561810 (diff)
parentfe9938cc4ce7885533bf751de5b2eb65a962e99c (diff)
Merge branch 'master' of https://github.com/ponzu-cms/ponzu
Diffstat (limited to 'system/db/content.go')
-rw-r--r--system/db/content.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/db/content.go b/system/db/content.go
index a20a6c0..fbdd8dd 100644
--- a/system/db/content.go
+++ b/system/db/content.go
@@ -565,13 +565,13 @@ func Query(namespace string, opts QueryOptions) (int, [][]byte) {
}
var sortContentCalls = make(map[string]time.Time)
-var waitDuration = time.Millisecond * 4000
+var waitDuration = time.Millisecond * 2000
func enoughTime(key string, withDelay bool) bool {
last, ok := sortContentCalls[key]
if !ok {
- // no envocation yet
- // track next evocation
+ // no invocation yet
+ // track next invocation
sortContentCalls[key] = time.Now()
return true
}
@@ -587,7 +587,7 @@ func enoughTime(key string, withDelay bool) bool {
select {
case <-time.After(waitDuration):
if enoughTime(key, false) {
- // track next evocation
+ // track next invocation
sortContentCalls[key] = time.Now()
SortContent(key)
} else {
@@ -598,7 +598,7 @@ func enoughTime(key string, withDelay bool) bool {
}()
}
- // track next evocation
+ // track next invocation
sortContentCalls[key] = time.Now()
return true
}