Skip to content

Commit 08a8e85

Browse files
committed
Added section on Process arguments
1 parent e20e956 commit 08a8e85

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/orchestrator_connection.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,29 @@ orchestrator_connection = OrchestratorConnection(process_name: str, connection_s
4747
or with different encryption keys within the same process as the connection is dependent on global state.
4848
Ideally you should only create a single connection and then pass it around.
4949

50+
## Process arguments
51+
52+
Any arguments defined when the trigger was created in Orchestrator can be accessed like this:
53+
54+
```python
55+
orchestrator_connection.process_arguments
56+
```
57+
58+
For more complicated arguments it's recommended to use json objects. The argument could be given to Orchestrator like this:
59+
60+
```json
61+
{"name": "John", "number of legs": 2, "email": "[email protected]"}
62+
```
63+
64+
And then unpacked in code:
65+
66+
```python
67+
import json
68+
argument_dict = json.loads(orchestrator_connection.process_arguments)
69+
name = argument_dict["name"]
70+
```
71+
72+
5073
## Creating logs
5174

5275
When creating logs you need to use one of three functions:

0 commit comments

Comments
 (0)