mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Print timing information for shutdown in debug mode
Fixes #2654 (Add shutdown log message)
This commit is contained in:
parent
54ab4e3863
commit
0e58469834
@ -1237,6 +1237,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def shutdown(self, write_settings=True):
|
def shutdown(self, write_settings=True):
|
||||||
|
timed_print('Shutdown starting...')
|
||||||
self.shutting_down = True
|
self.shutting_down = True
|
||||||
if hasattr(self.library_view, 'connect_to_book_display_timer'):
|
if hasattr(self.library_view, 'connect_to_book_display_timer'):
|
||||||
self.library_view.connect_to_book_display_timer.stop()
|
self.library_view.connect_to_book_display_timer.stop()
|
||||||
@ -1322,11 +1323,12 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
|
|||||||
self.istores.join()
|
self.istores.join()
|
||||||
wait_for_cleanup()
|
wait_for_cleanup()
|
||||||
wait_for_stop()
|
wait_for_stop()
|
||||||
|
self.shutdown_completed.emit()
|
||||||
|
timed_print('Shutdown complete, quitting...')
|
||||||
try:
|
try:
|
||||||
sys.stdout.flush() # Make sure any buffered prints are written for debug mode
|
sys.stdout.flush() # Make sure any buffered prints are written for debug mode
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
self.shutdown_completed.emit()
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def run_wizard(self, *args):
|
def run_wizard(self, *args):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user