tweaking idleshut usage

pull/8/head
Stephen Searles 7 years ago
parent 7e4686a229
commit edfe79ebc0
  1. 9
      hugo.go

@ -24,7 +24,7 @@ func HugoCmdProcessConfig(ch *CaddyHugo, es *editSession, touchFn func()) idlesh
cmd.Dir = es.tmpdir
return idleshut.Config{
Tick: WebsocketFileTicker,
TickDuration: WebsocketFileTicker,
MaxIdleTicks: uint(IdleWebsocketTimeout/WebsocketFileTicker) + 1,
Start: func() error {
@ -56,13 +56,10 @@ func HugoCmdProcessConfig(ch *CaddyHugo, es *editSession, touchFn func()) idlesh
return nil
},
IdleProcessError: func(err error) {
TickError: func(err error) {
fmt.Println("error processing draft:", err)
},
IdleTick: func() error {
return ioutil.WriteFile(es.filename, []byte(es.doc.Contents()), 0644)
},
ActiveTick: func() error {
Tick: func() error {
return ioutil.WriteFile(es.filename, []byte(es.doc.Contents()), 0644)
},
}

Loading…
Cancel
Save