style95 commented on a change in pull request #4983:
URL: https://github.com/apache/openwhisk/pull/4983#discussion_r501440428
##########
File path:
common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala
##########
@@ -426,3 +426,16 @@ object EventMessage extends DefaultJsonProtocol {
def parse(msg: String) = Try(format.read(msg.parseJson))
}
+
+object StatusQuery
+case class StatusData(invocationNamespace: String, fqn: String,
waitingActivation: Int, status: String, data: String)
Review comment:
This is to query the queue status from the scheduler.
The following is an example.
When a `MemoryQueue(AkkaFSM)` is running, there can be a different
combination of status and data.
This would be useful to figure out the status when any issue happens in a
queue or scheduler.
```
[
...
{
"data": "RunningData",
"fqn": "whisk.system/elasticsearch/[email protected]",
"invocationNamespace": "style95",
"status": "Running",
"waitingActivation": 1
}
...
]
```
##########
File path:
common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala
##########
@@ -426,3 +426,16 @@ object EventMessage extends DefaultJsonProtocol {
def parse(msg: String) = Try(format.read(msg.parseJson))
}
+
+object StatusQuery
+case class StatusData(invocationNamespace: String, fqn: String,
waitingActivation: Int, status: String, data: String)
Review comment:
The `waitingActivation` is the number of waiting activations in a queue.
Generally, this value would be a small number or zero as most activation
messages would be properly handled in time.
But if there is any issue; containers are not provisioned in time, any
disconnection with other components happens, etc, there can be many activations
waiting for processing.
Regarding the basic types, we just used the string as it is simple.
If we need to change it to certain types with proper serde, how about adding
them when we add a feature to use this data class?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]