move model retrain to runners closes #94
This commit is contained in:
@@ -21,6 +21,10 @@ type ServiceUser struct {
|
||||
UserId string `toml:"__user__id__"`
|
||||
}
|
||||
|
||||
type DbInfo struct {
|
||||
MaxConnections int `toml:"max_connections"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Hostname string
|
||||
Port int
|
||||
@@ -30,6 +34,8 @@ type Config struct {
|
||||
GpuWorker WorkerConfig `toml:"Worker"`
|
||||
|
||||
ServiceUser ServiceUser `toml:"ServiceUser"`
|
||||
|
||||
DbInfo DbInfo `toml:"DB"`
|
||||
}
|
||||
|
||||
func LoadConfig() Config {
|
||||
@@ -52,6 +58,9 @@ func LoadConfig() Config {
|
||||
User: "Service",
|
||||
UserId: "",
|
||||
},
|
||||
DbInfo: DbInfo{
|
||||
MaxConnections: 200,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,13 +93,13 @@ func (c *Config) GenerateToken(db *sql.DB) {
|
||||
Email string
|
||||
Salt string
|
||||
Password string
|
||||
UserType UserType `db:"user_type"`
|
||||
UserType UserType `db:"user_type"`
|
||||
}{
|
||||
c.ServiceUser.User,
|
||||
c.ServiceUser.User,
|
||||
"",
|
||||
"",
|
||||
User_Admin,
|
||||
User_Admin,
|
||||
}
|
||||
id, err := InsertReturnId(db, &newUser, "users", "id")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user