* 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
33 строки
631 B
Go
33 строки
631 B
Go
package main
|
|
|
|
import (
|
|
"github.com/mattermost/platform/app"
|
|
"github.com/mattermost/platform/model"
|
|
"github.com/mattermost/platform/utils"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func initDBCommandContextCobra(cmd *cobra.Command) error {
|
|
config, err := cmd.Flags().GetString("config")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
initDBCommandContext(config)
|
|
|
|
return nil
|
|
}
|
|
|
|
func initDBCommandContext(configFileLocation string) {
|
|
if errstr := utils.InitAndLoadConfig(configFileLocation); errstr != "" {
|
|
return
|
|
}
|
|
|
|
utils.ConfigureCmdLineLog()
|
|
|
|
app.NewServer()
|
|
app.InitStores()
|
|
if model.BuildEnterpriseReady == "true" {
|
|
app.LoadLicense()
|
|
}
|
|
}
|