Cosmetic change
This commit is contained in:
@@ -10,16 +10,19 @@ TARGETS = [
|
||||
'name': 'Gitea',
|
||||
'url': 'https://gitea.rainbow-herring.ts.net/api/healthz',
|
||||
'kind': 'gitea',
|
||||
'critical': True,
|
||||
},
|
||||
{
|
||||
'name': 'Packs Site (Production)',
|
||||
'url': 'https://jakerasp.rainbow-herring.ts.net/healthz/',
|
||||
'kind': 'packs',
|
||||
'critical': True,
|
||||
},
|
||||
{
|
||||
'name': 'Packs Site (Development)',
|
||||
'url': 'https://jakepc.rainbow-herring.ts.net/healthz/',
|
||||
'kind': 'packs',
|
||||
'critical': False,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -80,6 +83,7 @@ async def check_target(session, target, timeout):
|
||||
'name': target['name'],
|
||||
'kind': target.get('kind', ''),
|
||||
'url': target['url'],
|
||||
'critical': target.get('critical', True),
|
||||
'up': False,
|
||||
'status_code': None,
|
||||
'latency_ms': None,
|
||||
|
||||
@@ -61,7 +61,7 @@ class HealthBot(discord.Client):
|
||||
return await checks.run_checks(session, config.CHECK_TIMEOUT)
|
||||
|
||||
def build_embed(self, results):
|
||||
all_up = all(r['up'] for r in results)
|
||||
all_up = all(r['up'] for r in results if r.get('critical', True))
|
||||
color = discord.Color.green() if all_up else discord.Color.red()
|
||||
embed = discord.Embed(
|
||||
title='Service Health',
|
||||
|
||||
Reference in New Issue
Block a user