feat: publish standalone worker
Separate worker packaging and service lifecycle from the control plane.
Этот коммит содержится в:
20
app/models/region.go
Обычный файл
20
app/models/region.go
Обычный файл
@@ -0,0 +1,20 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"rsgit.ru/rsmon/rsmon/app/models/concerns"
|
||||
)
|
||||
|
||||
// DefaultRegionCode is the historical default region code seeded by
|
||||
// Migrate() (see app/models/migrate.go). Centralized here so admin
|
||||
// endpoints and check_jobs.go agree on the literal.
|
||||
const DefaultRegionCode = "local"
|
||||
|
||||
// Region represents a geographic region where distributed workers can run
|
||||
type Region struct {
|
||||
concerns.Model
|
||||
Code string `gorm:"uniqueIndex;size:20;not null" json:"code"` // e.g. "ru-msk", "us-east", "eu-west"
|
||||
Name string `gorm:"not null" json:"name"` // "Moscow, Russia"
|
||||
Enabled bool `gorm:"not null;default:true" json:"enabled"`
|
||||
Priority int `gorm:"not null;default:0" json:"priority"`
|
||||
concerns.Timestamped
|
||||
}
|
||||
Ссылка в новой задаче
Block a user