File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1530515305 "type": "string"
1530615306 },
1530715307 "status": {
15308- "type ": "string ",
15308+ "$ref ": "#/definitions/v1WorkerStatus ",
1530915309 "description": "Worker status. Possible values - \"running\", \"shutting_down\", \"shutdown\"."
1531015310 },
1531115311 "uptime": {
1541915419 }
1542015420 }
1542115421 },
15422+ "v1WorkerStatus": {
15423+ "type": "string",
15424+ "enum": [
15425+ "WORKER_STATUS_UNSPECIFIED",
15426+ "WORKER_STATUS_STATUS_RUNNING",
15427+ "WORKER_STATUS_SHUTTING_DOWN",
15428+ "WORKER_STATUS_SHUTDOWN"
15429+ ],
15430+ "default": "WORKER_STATUS_UNSPECIFIED"
15431+ },
1542215432 "v1WorkerVersionCapabilities": {
1542315433 "type": "object",
1542415434 "properties": {
Original file line number Diff line number Diff line change @@ -12671,8 +12671,14 @@ components:
1267112671 sdkVersion:
1267212672 type: string
1267312673 status:
12674+ enum:
12675+ - WORKER_STATUS_UNSPECIFIED
12676+ - WORKER_STATUS_STATUS_RUNNING
12677+ - WORKER_STATUS_SHUTTING_DOWN
12678+ - WORKER_STATUS_SHUTDOWN
1267412679 type: string
1267512680 description: Worker status. Possible values - "running", "shutting_down", "shutdown".
12681+ format: enum
1267612682 uptime:
1267712683 pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
1267812684 type: string
Original file line number Diff line number Diff line change @@ -96,4 +96,13 @@ enum ApplicationErrorCategory {
9696 APPLICATION_ERROR_CATEGORY_UNSPECIFIED = 0 ;
9797 // Expected application error with little/no severity.
9898 APPLICATION_ERROR_CATEGORY_BENIGN = 1 ;
99- }
99+ }
100+
101+ // (-- api-linter: core::0216::synonyms=disabled
102+ // aip.dev/not-precedent: It seems we have both state and status, and status is a better fit for workers. --)
103+ enum WorkerStatus {
104+ WORKER_STATUS_UNSPECIFIED = 0 ;
105+ WORKER_STATUS_STATUS_RUNNING = 1 ;
106+ WORKER_STATUS_SHUTTING_DOWN = 2 ;
107+ WORKER_STATUS_SHUTDOWN = 3 ;
108+ }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ option csharp_namespace = "Temporalio.Api.Worker.V1";
1313import "google/protobuf/duration.proto" ;
1414import "google/protobuf/timestamp.proto" ;
1515import "temporal/api/deployment/v1/message.proto" ;
16+ import "temporal/api/enums/v1/common.proto" ;
1617
1718message WorkerPollerInfo {
1819
@@ -73,7 +74,7 @@ message WorkerInfo {
7374 string sdk_version = 6 ;
7475
7576 // Worker status. Possible values - "running", "shutting_down", "shutdown".
76- string status = 7 ;
77+ temporal.api.enums.v1.WorkerStatus status = 7 ;
7778
7879 // Uptime of the worker, since it started.
7980 // This is the time since the worker started, not the time since the last heartbeat.
You can’t perform that action at this time.
0 commit comments