mtime optimization
This commit is contained in:
parent
10b84dc8ee
commit
b0ee7a0464
@ -1,10 +1,11 @@
|
||||
package tilerendererjob
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"mapserver/app"
|
||||
"mapserver/coords"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func incrementalRender(ctx *app.App, jobs chan *coords.TileCoords) {
|
||||
@ -25,6 +26,9 @@ func incrementalRender(ctx *app.App, jobs chan *coords.TileCoords) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
rstate.LastMtime = result.LastMtime
|
||||
ctx.Config.Save()
|
||||
|
||||
if len(result.List) == 0 {
|
||||
time.Sleep(5 * time.Second)
|
||||
continue
|
||||
@ -32,9 +36,6 @@ func incrementalRender(ctx *app.App, jobs chan *coords.TileCoords) {
|
||||
|
||||
tiles := renderMapblocks(ctx, jobs, result.List)
|
||||
|
||||
rstate.LastMtime = result.LastMtime
|
||||
ctx.Config.Save()
|
||||
|
||||
t := time.Now()
|
||||
elapsed := t.Sub(start)
|
||||
|
||||
|
@ -20,4 +20,6 @@ func Job(ctx *app.App) {
|
||||
|
||||
incrementalRender(ctx, jobs)
|
||||
|
||||
panic("render job interrupted!")
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user