1
0
forked from MTSR/mapserver

db access fixes

This commit is contained in:
NatureFreshMilk 2019-02-08 08:14:22 +01:00
parent 44b4eef640
commit 8eca70aa5e
3 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,6 @@ import (
)
func New(filename string) (*Sqlite3Accessor, error) {
//TODO: flag/config for unsafe db access
db, err := sql.Open("sqlite3", filename+"?_timeout=500")
db.SetMaxOpenConns(1)

View File

@ -2,6 +2,7 @@ package sqlite
const migrateScript = `
PRAGMA foreign_keys = ON;
PRAGMA journal_mode = TRUNCATE;
create table if not exists objects(
id integer primary key autoincrement,

View File

@ -36,11 +36,11 @@ func incrementalRender(ctx *app.App, jobs chan *coords.TileCoords) {
continue
}
tiles := renderMapblocks(ctx, jobs, result.List)
lastMtime = result.LastMtime
ctx.Settings.SetInt64(settings.SETTING_LAST_MTIME, lastMtime)
tiles := renderMapblocks(ctx, jobs, result.List)
t := time.Now()
elapsed := t.Sub(start)