Gets the settings, whoopsie on the order of commits
This commit is contained in:
parent
003de16e2b
commit
d474d98f84
17
poll/main.go
17
poll/main.go
@ -21,10 +21,27 @@ func main() {
|
||||
reportPostChan := make(chan ReportPost)
|
||||
runninginstances = make(map[string]RunningInstance)
|
||||
|
||||
getSettings()
|
||||
go startpprof()
|
||||
|
||||
pool := get_db_pool()
|
||||
|
||||
|
||||
go startctl(reportPostChan)
|
||||
|
||||
for _, endpoint := range settings.Autostart {
|
||||
log.Print("Autostarting " + endpoint)
|
||||
ri_mutex.Lock()
|
||||
_, exists := runninginstances[endpoint]
|
||||
if exists == true {
|
||||
log.Println("Already exists: " + endpoint)
|
||||
} else {
|
||||
runninginstances[endpoint] = RunningInstance{}
|
||||
go StartInstance(endpoint, reportPostChan)
|
||||
}
|
||||
ri_mutex.Unlock()
|
||||
}
|
||||
|
||||
go webmain(reportPostChan)
|
||||
for { // Write posts
|
||||
v := <-reportPostChan
|
||||
|
Loading…
x
Reference in New Issue
Block a user