carl: add check_status method checking if Carl is up (#88345) #498
Loading…
Reference in New Issue
No description provided.
Delete Branch "wip/88345-carl-check-status"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WIP: carl: add check_status method checking if Carl is up (#88345)to carl: add check_status method checking if Carl is up (#88345)@ -131,1 +131,4 @@
def check_status(self):
url = urllib.parse.urljoin(self.service_url, 'public/status')
try:
Pas la peine de faire un try ici, justement, on veut que ça crashe quand ça va pas :)
Tu peux aller sur du super simple :
3338738767
tobd8f51045a
@ -132,0 +134,4 @@
response = self.requests.get(url)
response.raise_for_status()
if response.text.strip() != 'status: ok':
raise RuntimeError('Carl status check fails')
Absolument pas fan de cette exception, utilise la nôtre APIError. (ok, c'est sa fille, mais on la décore comme on veut, je préfère)
Ok, moi aussi je préfère à priori, mais je n'étais pas certain qu'elle soit pertinente ici :)
bd8f51045a
to134133efa1
134133efa1
to41d84e3dd2
41d84e3dd2
tob5ccfb60ff