21 lines
574 B
Python
21 lines
574 B
Python
|
|
class WebexStatus:
|
||
|
|
def __init__(self, api):
|
||
|
|
self._api = api
|
||
|
|
|
||
|
|
async def probe(self) -> dict:
|
||
|
|
try:
|
||
|
|
me = self._api.people.me()
|
||
|
|
return {
|
||
|
|
"healthy": True,
|
||
|
|
"bot_name": me.displayName,
|
||
|
|
"bot_email": me.emails[0] if me.emails else "N/A",
|
||
|
|
"error": None,
|
||
|
|
}
|
||
|
|
except Exception as e:
|
||
|
|
return {
|
||
|
|
"healthy": False,
|
||
|
|
"bot_name": "N/A",
|
||
|
|
"bot_email": "N/A",
|
||
|
|
"error": str(e),
|
||
|
|
}
|