Commit fb11e5a 1 parent 73e2b2a commit fb11e5a Copy full SHA for fb11e5a
File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,32 @@ of a Task::
216
216
else:
217
217
print('Task did not complete successfully')
218
218
219
+ Check Health of a Process
220
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
221
+
222
+ Usually it's good when a Process is still running, but some Processes
223
+ will also mark themselves as "degraded" if there is some non-fatal
224
+ problem that means the acquisition or control is not occurring::
225
+
226
+ from ocs.ocs_client import OCSClient
227
+
228
+ client = OCSClient('agent-instance-id')
229
+
230
+ client.some_process.start()
231
+ time.sleep(2)
232
+ status = client.some_process()
233
+
234
+ if response.session['success'] is None:
235
+ if response.session['degraded']:
236
+ print('Process is running, but in a degraded state.')
237
+ else:
238
+ print('Process is running (and does not report degraded state).')
239
+ elif response.session['success']:
240
+ print('Process exited without error')
241
+ else:
242
+ print('Process exited with error')
243
+
244
+
219
245
Check Latest Data in an Operation
220
246
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221
247
You can’t perform that action at this time.
0 commit comments