diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-05-18 15:05:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 15:05:57 -0400 |
commit | 577ed27f1bb060080d311342047e31943a02ccbb (patch) | |
tree | ad57fa69b1daf143e914ea2480a475e5450cc236 /cmd/platform/init.go | |
parent | 920bc0d8712a50691b1f698779f60132536eb214 (diff) | |
download | chat-577ed27f1bb060080d311342047e31943a02ccbb.tar.gz chat-577ed27f1bb060080d311342047e31943a02ccbb.tar.bz2 chat-577ed27f1bb060080d311342047e31943a02ccbb.zip |
PLT-6408 Framework for job server (#6404)
* Added initial job server
* Added job server to be ran as part of platform
* Added test job to the enterprise repo
* Fixed job server not loading license
* Renamed job package to jobs
* Fixed TE not being buildable
* Added JobStatus table to database
* Changed fields used by JobStatus
* Added APIs to query job status
* Added config change listener to server
* Added option to run job server from Makefile
* Added ability to enable/disable jobs from config
* Commented out placeholder for search indexing job
* Fixed govet
* Removed debug messages and fixed job api init message
Diffstat (limited to 'cmd/platform/init.go')
-rw-r--r-- | cmd/platform/init.go | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/cmd/platform/init.go b/cmd/platform/init.go index 7d01eb890..b650cf2fd 100644 --- a/cmd/platform/init.go +++ b/cmd/platform/init.go @@ -1,29 +1,12 @@ package main import ( - "fmt" - "github.com/mattermost/platform/app" "github.com/mattermost/platform/model" "github.com/mattermost/platform/utils" "github.com/spf13/cobra" ) -func doLoadConfig(filename string) (err string) { - defer func() { - if r := recover(); r != nil { - err = fmt.Sprintf("%v", r) - } - }() - utils.TranslationsPreInit() - utils.EnableConfigFromEnviromentVars() - utils.LoadConfig(filename) - utils.InitializeConfigWatch() - utils.EnableConfigWatch() - - return "" -} - func initDBCommandContextCobra(cmd *cobra.Command) error { config, err := cmd.Flags().GetString("config") if err != nil { @@ -35,7 +18,7 @@ func initDBCommandContextCobra(cmd *cobra.Command) error { } func initDBCommandContext(configFileLocation string) { - if errstr := doLoadConfig(configFileLocation); errstr != "" { + if errstr := utils.InitAndLoadConfig(configFileLocation); errstr != "" { return } |