diff examples/blog/src/lib/Db.luan @ 1399:38a1c1b4279a

fix
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 11 Sep 2019 16:28:38 -0600
parents 67c0e47b5be3
children ef1620aa99cb
line wrap: on
line diff
--- a/examples/blog/src/lib/Db.luan	Wed Sep 11 15:48:49 2019 -0600
+++ b/examples/blog/src/lib/Db.luan	Wed Sep 11 16:28:38 2019 -0600
@@ -4,6 +4,8 @@
 local Lucene = require "luan:lucene/Lucene.luan"
 local Io = require "luan:Io.luan"
 local Hosting = require "luan:host/Hosting.luan"
+local Time = require "luan:Time.luan"
+local Thread = require "luan:Thread.luan"
 local Logging = require "luan:logging/Logging.luan"
 local logger = Logging.logger "Db"
 
@@ -36,5 +38,6 @@
 Db.db = Db.new("site:/private/local/lucene")
 
 Db.db.restore_from_postgres()
-Db.db.check()
+Thread.schedule( Db.db.check, { delay=0, repeating_delay=Time.period{minutes=1}, daemon = true } )
+
 return Db