Skip to content

Commit

Permalink
load report config periodically
Browse files Browse the repository at this point in the history
  • Loading branch information
howeyc committed Oct 12, 2015
1 parent aafef34 commit 77fd0e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cmd/lweb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ type reportConfig struct {
Exclude []string `toml:"exclude"`
}

var rLoadData, reportConfigData struct {
type reportConfigStruct struct {
Reports []reportConfig `toml:"report"`
}

var reportConfigData reportConfigStruct

type pageData struct {
Reports []reportConfig
Transactions []*ledger.Transaction
Expand All @@ -76,6 +78,7 @@ func main() {

go func() {
for {
var rLoadData reportConfigStruct
toml.DecodeFile(reportConfigFileName, &rLoadData)
reportConfigData = rLoadData
time.Sleep(time.Minute * 5)
Expand Down

0 comments on commit 77fd0e4

Please sign in to comment.