Carol API Module
check_task_status(task_id, task_name='')
Check the task status until it complete with success, fail or if is canceled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id |
str
|
The task id. |
required |
task_name |
str
|
The task name. Defaults to "". |
''
|
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
Dict[str, str]: A dict with the |
Source code in carol_app_monitor/carol_api.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | |
get_all_carol_app_names(properties)
Get all CarolApp names existing in tenant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
properties |
Dict[str, Dict[str, Any]]
|
A dict with properties from CarolApps. |
required |
Returns:
| Type | Description |
|---|---|
List[str]
|
List[str]: A list with all CarolApp names. |
Source code in carol_app_monitor/carol_api.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
get_entity_type(app_name)
Get entity type from CarolApp by app_name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_name |
str | List[str]
|
CarolApp name. Can be |
required |
Returns:
| Type | Description |
|---|---|
List[Dict[str, str]]
|
List[Dict[str, str | None]]: A list of dicts with |
Notes
The entity_type can be:
* mdmTenantAppAIProcess: batch
* mdmTenantAppAIProcessWorking: online
Source code in carol_app_monitor/carol_api.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | |
get_process_name(app_name)
Get process name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_name |
str | List[str]
|
CarolApp name. Can be |
required |
Returns:
| Type | Description |
|---|---|
List[Dict[str, str | None]]
|
List[Dict[str, str]]: A list of dicts with |
Source code in carol_app_monitor/carol_api.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
get_process_status(app_name)
Get CarolApp process status by CarolApp name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_name |
str | List[str]
|
CarolApp name. Can be |
required |
Returns:
| Type | Description |
|---|---|
List[Dict[str, str | None]]
|
List[Dict[str, str]]: A list of dicts containing the |
Source code in carol_app_monitor/carol_api.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
get_properties_from_app()
Get properties from all existing CarolApps in tenant ordered by date created.
Returns:
| Type | Description |
|---|---|
Dict[str, Dict[str, Any]]
|
Dict[str, Dict[str, Any]]: A dict with all properties from all existing CarolApps. |
Source code in carol_app_monitor/carol_api.py
17 18 19 20 21 22 23 24 25 | |
get_task_status(task_id)
Check task status by task_id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id |
str
|
The TaskID. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The task status. Can be: READY, RUNNING, COMPLETED, FAILED or CANCELED. |
Source code in carol_app_monitor/carol_api.py
146 147 148 149 150 151 152 153 154 155 156 | |
start_app_process(app_info)
Start a CarolApp process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app_info |
Dict[str, str]
|
A dict containing the |
required |
Raises:
| Type | Description |
|---|---|
TaskError
|
If task fail, raises: Something wrong while processing the task. |
Returns:
| Type | Description |
|---|---|
Dict[str, str]
|
Dict[str, str]: A dict with the |
Source code in carol_app_monitor/carol_api.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |