The app.shutdown() takes about 30 seconds to shut down? #3401
Replies: 5 comments 10 replies
-
Here is another version ,it works fine. from nicegui import app, ui
from datetime import datetime
def shutdown_():
print(f'start shutdown: {datetime.now()}')
app.shutdown()
ui.button('shutdown', on_click=shutdown_)
app.on_shutdown(lambda: print(f'shutdown: {datetime.now()}'))
ui.run() The result:
|
Beta Was this translation helpful? Give feedback.
-
It works well,need more details of your environment. |
Beta Was this translation helpful? Give feedback.
-
from nicegui import app, ui
from datetime import datetime
ui.button('shutdown', on_click=lambda:app.shutdown())
app.on_shutdown(lambda: print(f'shutdown: {datetime.now()}'))
ui.run() This is the same as above |
Beta Was this translation helpful? Give feedback.
-
I test it in Powershell ,it works fine. But when I run it in Vscode ,it has such problem, the terminal with Vscode is actually Powershell |
Beta Was this translation helpful? Give feedback.
-
from nicegui import app, ui
ui.button('shutdown1', on_click=lambda :(app.shutdown(), print('\r', end='',sep='')))
ui.run() |
Beta Was this translation helpful? Give feedback.
-
The app.shutdown() takes about 30 seconds to shut down,is it normal?
The program contains only one line code ,with no additional logi.
Beta Was this translation helpful? Give feedback.
All reactions