DmitrMakeev commited on
Commit
aac4347
·
verified ·
1 Parent(s): 67d23f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -104,12 +104,10 @@ for db in DATABASES:
104
 
105
  async def display_date():
106
  loop = asyncio.get_running_loop()
107
- end_time = loop.time() + 50.0
108
- while True:
109
- print(datetime.datetime.now())
110
- if (loop.time() + 1.0) >= end_time:
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