Update app.py
Browse files
app.py
CHANGED
|
@@ -43,9 +43,9 @@ async def check_url(session, url):
|
|
| 43 |
async with session.get(url) as response:
|
| 44 |
async with lock:
|
| 45 |
status[url]['status_code'] = response.status
|
| 46 |
-
current_time = datetime.now(timezone).strftime('%m-%d %H
|
| 47 |
if response.status == 200:
|
| 48 |
-
status[url]['message'] = f
|
| 49 |
else:
|
| 50 |
status[url]['message'] = f'Service is down or returned an error. ({current_time})'
|
| 51 |
logger.info(f"{current_time} - {url} status: {response.status}")
|
|
|
|
| 43 |
async with session.get(url) as response:
|
| 44 |
async with lock:
|
| 45 |
status[url]['status_code'] = response.status
|
| 46 |
+
current_time = datetime.now(timezone).strftime('%m-%d %H')
|
| 47 |
if response.status == 200:
|
| 48 |
+
status[url]['message'] = f"Service is up and running! ({current_time})"
|
| 49 |
else:
|
| 50 |
status[url]['message'] = f'Service is down or returned an error. ({current_time})'
|
| 51 |
logger.info(f"{current_time} - {url} status: {response.status}")
|