Manager: remove Worker.LastActivity
This removes the field both from the OpenAPI interface and the database.
This commit is contained in:
parent
431406a301
commit
19db947eb4
@ -135,7 +135,6 @@ func testWorker() persistence.Worker {
|
||||
UUID: "e7632d62-c3b8-4af0-9e78-01752928952c",
|
||||
Name: "дрон",
|
||||
Address: "fe80::5054:ff:fede:2ad7",
|
||||
LastActivity: "",
|
||||
Platform: "linux",
|
||||
Software: "3.0",
|
||||
Status: api.WorkerStatusAwake,
|
||||
|
@ -66,7 +66,6 @@ func (f *Flamenco) RegisterWorker(e echo.Context) error {
|
||||
Uuid: dbWorker.UUID,
|
||||
Nickname: dbWorker.Name,
|
||||
Address: dbWorker.Address,
|
||||
LastActivity: dbWorker.LastActivity,
|
||||
Platform: dbWorker.Platform,
|
||||
Software: dbWorker.Software,
|
||||
Status: dbWorker.Status,
|
||||
|
@ -307,7 +307,6 @@ func createWorker(ctx context.Context, t *testing.T, db *DB) *Worker {
|
||||
UUID: "f0a123a9-ab05-4ce2-8577-94802cfe74a4",
|
||||
Name: "дрон",
|
||||
Address: "fe80::5054:ff:fede:2ad7",
|
||||
LastActivity: "",
|
||||
Platform: "linux",
|
||||
Software: "3.0",
|
||||
Status: api.WorkerStatusAwake,
|
||||
|
@ -19,7 +19,6 @@ type Worker struct {
|
||||
Name string `gorm:"type:varchar(64);default:''"`
|
||||
|
||||
Address string `gorm:"type:varchar(39);default:'';index"` // 39 = max length of IPv6 address.
|
||||
LastActivity string `gorm:"type:varchar(255);default:''"`
|
||||
Platform string `gorm:"type:varchar(16);default:''"`
|
||||
Software string `gorm:"type:varchar(32);default:''"`
|
||||
Status api.WorkerStatus `gorm:"type:varchar(16);default:''"`
|
||||
|
@ -21,7 +21,6 @@ func TestCreateFetchWorker(t *testing.T) {
|
||||
UUID: uuid.New(),
|
||||
Name: "дрон",
|
||||
Address: "fe80::5054:ff:fede:2ad7",
|
||||
LastActivity: "",
|
||||
Platform: "linux",
|
||||
Software: "3.0",
|
||||
Status: api.WorkerStatusAwake,
|
||||
@ -39,7 +38,6 @@ func TestCreateFetchWorker(t *testing.T) {
|
||||
assert.Equal(t, w.UUID, fetchedWorker.UUID)
|
||||
assert.Equal(t, w.Name, fetchedWorker.Name)
|
||||
assert.Equal(t, w.Address, fetchedWorker.Address)
|
||||
assert.Equal(t, w.LastActivity, fetchedWorker.LastActivity)
|
||||
assert.Equal(t, w.Platform, fetchedWorker.Platform)
|
||||
assert.Equal(t, w.Software, fetchedWorker.Software)
|
||||
assert.Equal(t, w.Status, fetchedWorker.Status)
|
||||
@ -55,7 +53,6 @@ func TestSaveWorker(t *testing.T) {
|
||||
UUID: uuid.New(),
|
||||
Name: "дрон",
|
||||
Address: "fe80::5054:ff:fede:2ad7",
|
||||
LastActivity: "",
|
||||
Platform: "linux",
|
||||
Software: "3.0",
|
||||
Status: api.WorkerStatusAwake,
|
||||
@ -73,7 +70,6 @@ func TestSaveWorker(t *testing.T) {
|
||||
updatedWorker := *fetchedWorker
|
||||
updatedWorker.Name = "7 မှ 9"
|
||||
updatedWorker.Address = "fe80::cafe:f00d"
|
||||
updatedWorker.LastActivity = "Rendering"
|
||||
updatedWorker.Platform = "windows"
|
||||
updatedWorker.Software = "3.1"
|
||||
updatedWorker.Status = api.WorkerStatusAsleep
|
||||
@ -119,7 +115,6 @@ func TestFetchWorkers(t *testing.T) {
|
||||
UUID: uuid.New(),
|
||||
Name: "дрон",
|
||||
Address: "fe80::5054:ff:fede:2ad7",
|
||||
LastActivity: "",
|
||||
Platform: "linux",
|
||||
Software: "3.0",
|
||||
Status: api.WorkerStatusAwake,
|
||||
@ -139,7 +134,6 @@ func TestFetchWorkers(t *testing.T) {
|
||||
UUID: uuid.New(),
|
||||
Name: "очиститель окон",
|
||||
Address: "fe80::c000:d000:::3",
|
||||
LastActivity: "nothing",
|
||||
Platform: "windows",
|
||||
Software: "3.0",
|
||||
Status: api.WorkerStatusOffline,
|
||||
|
Loading…
x
Reference in New Issue
Block a user