mirror of
https://github.com/hibiken/asynq.git
synced 2025-08-19 15:08:55 +08:00
Change Server API
* Rename ServerStatus to ServerState internally * Rename terminate to shutdown internally * Update Scheduler API to match Server API
This commit is contained in:
@@ -3305,7 +3305,7 @@ func TestListServers(t *testing.T) {
|
||||
ServerID: "server123",
|
||||
Concurrency: 10,
|
||||
Queues: map[string]int{"default": 1},
|
||||
Status: "running",
|
||||
Status: "active",
|
||||
Started: started1,
|
||||
ActiveWorkerCount: 0,
|
||||
}
|
||||
|
@@ -1475,7 +1475,7 @@ func TestWriteServerState(t *testing.T) {
|
||||
Queues: map[string]int{"default": 2, "email": 5, "low": 1},
|
||||
StrictPriority: false,
|
||||
Started: time.Now().UTC(),
|
||||
Status: "running",
|
||||
Status: "active",
|
||||
ActiveWorkerCount: 0,
|
||||
}
|
||||
|
||||
@@ -1565,7 +1565,7 @@ func TestWriteServerStateWithWorkers(t *testing.T) {
|
||||
Queues: map[string]int{"default": 2, "email": 5, "low": 1},
|
||||
StrictPriority: false,
|
||||
Started: time.Now().Add(-10 * time.Minute).UTC(),
|
||||
Status: "running",
|
||||
Status: "active",
|
||||
ActiveWorkerCount: len(workers),
|
||||
}
|
||||
|
||||
@@ -1667,7 +1667,7 @@ func TestClearServerState(t *testing.T) {
|
||||
Queues: map[string]int{"default": 2, "email": 5, "low": 1},
|
||||
StrictPriority: false,
|
||||
Started: time.Now().Add(-10 * time.Minute),
|
||||
Status: "running",
|
||||
Status: "active",
|
||||
ActiveWorkerCount: len(workers1),
|
||||
}
|
||||
|
||||
@@ -1690,7 +1690,7 @@ func TestClearServerState(t *testing.T) {
|
||||
Queues: map[string]int{"default": 2, "email": 5, "low": 1},
|
||||
StrictPriority: false,
|
||||
Started: time.Now().Add(-15 * time.Minute),
|
||||
Status: "running",
|
||||
Status: "active",
|
||||
ActiveWorkerCount: len(workers2),
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user