mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-23 14:11:33 +00:00
Created process.start (markdown)
parent
59833f9a6e
commit
0558ece2be
55
process.start.md
Normal file
55
process.start.md
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
### Request
|
||||||
|
* **Description**: Instructs the supervisor daemon to start a registered process.
|
||||||
|
* **Subscribers**: [ProcessHandler](https://github.com/avatao-content/baseimage-tutorial-framework/wiki/ProcessHandler)
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"key": "process.start",
|
||||||
|
"intent": "control",
|
||||||
|
"scope": "zmq"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description |
|
||||||
|
| ------------ |:--------:|:------------------:| --------------------------- |
|
||||||
|
| *name* | `string` | :heavy_check_mark: | Name of the process. |
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"key": "process.start",
|
||||||
|
"name": "webservice"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Response
|
||||||
|
* **Description**: Raises an event that contains an `error` field if the process exited with an error code, otherwise it's just the same as the original request.
|
||||||
|
* **Subscribers**: *(none)*
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"key": "process.start",
|
||||||
|
"intent": "event",
|
||||||
|
"scope": "broadcast"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Parameter | Type | Required | Description |
|
||||||
|
| ------------ |:--------:|:------------------:| --------------------------- |
|
||||||
|
| *name* | `string` | :heavy_check_mark: | Name of the current FSM state. |
|
||||||
|
| *error* | `string` | | Error message of the supervisor daemon. |
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
**Example**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"key": "process.start",
|
||||||
|
"intent": "event",
|
||||||
|
"scope": "broadcast",
|
||||||
|
"name": "webservice",
|
||||||
|
"error": "SPAWN_ERROR: webservice..."
|
||||||
|
}
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user