comparison 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
comparison
equal deleted inserted replaced
1398:67c0e47b5be3 1399:38a1c1b4279a
2 local error = Luan.error 2 local error = Luan.error
3 local stringify = Luan.stringify or error() 3 local stringify = Luan.stringify or error()
4 local Lucene = require "luan:lucene/Lucene.luan" 4 local Lucene = require "luan:lucene/Lucene.luan"
5 local Io = require "luan:Io.luan" 5 local Io = require "luan:Io.luan"
6 local Hosting = require "luan:host/Hosting.luan" 6 local Hosting = require "luan:host/Hosting.luan"
7 local Time = require "luan:Time.luan"
8 local Thread = require "luan:Thread.luan"
7 local Logging = require "luan:logging/Logging.luan" 9 local Logging = require "luan:logging/Logging.luan"
8 local logger = Logging.logger "Db" 10 local logger = Logging.logger "Db"
9 11
10 12
11 local Db = {} 13 local Db = {}
34 end 36 end
35 37
36 Db.db = Db.new("site:/private/local/lucene") 38 Db.db = Db.new("site:/private/local/lucene")
37 39
38 Db.db.restore_from_postgres() 40 Db.db.restore_from_postgres()
39 Db.db.check() 41 Thread.schedule( Db.db.check, { delay=0, repeating_delay=Time.period{minutes=1}, daemon = true } )
42
40 return Db 43 return Db