Update app.py
Browse files
app.py
CHANGED
|
@@ -104,12 +104,10 @@ for db in DATABASES:
|
|
| 104 |
|
| 105 |
async def display_date():
|
| 106 |
loop = asyncio.get_running_loop()
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
break
|
| 112 |
-
await asyncio.sleep(1)
|
| 113 |
asyncio.run(display_date())
|
| 114 |
|
| 115 |
|
|
|
|
| 104 |
|
| 105 |
async def display_date():
|
| 106 |
loop = asyncio.get_running_loop()
|
| 107 |
+
print(datetime.datetime.now()) # Первый импульс
|
| 108 |
+
await asyncio.sleep(120) # Ожидание 2 минут (120 секунд)
|
| 109 |
+
print(datetime.datetime.now()) # Второй импульс
|
| 110 |
+
|
|
|
|
|
|
|
| 111 |
asyncio.run(display_date())
|
| 112 |
|
| 113 |
|