more debugging

This commit is contained in:
j 2015-11-19 18:40:42 +01:00
parent 3226fc969d
commit cc258fb5ee
2 changed files with 6 additions and 5 deletions

View file

@ -13,11 +13,6 @@ base = dirname(dirname(dirname(abspath(__file__))))
icon = os.path.join(base, 'openmedialibrary/static/png/oml.png') icon = os.path.join(base, 'openmedialibrary/static/png/oml.png')
title = "Open Media Library" title = "Open Media Library"
def drop_cb(wid, context, x, y, time):
print([str(t) for t in context.targets])
context.finish(True, False, time)
return True
def on_key_press_event(widget, event): def on_key_press_event(widget, event):
if event.state & Gdk.ModifierType.CONTROL_MASK and event.keyval == 113: if event.state & Gdk.ModifierType.CONTROL_MASK and event.keyval == 113:
Gtk.main_quit() Gtk.main_quit()

View file

@ -118,15 +118,21 @@ def run():
def shutdown(): def shutdown():
if state.downloads: if state.downloads:
logger.debug('shutdown downloads')
state.downloads.join() state.downloads.join()
if state.scraping: if state.scraping:
logger.debug('shutdown scraping')
state.scraping.join() state.scraping.join()
logger.debug('shutdown http_server')
http_server.stop() http_server.stop()
if state.tasks: if state.tasks:
logger.debug('shutdown tasks')
state.tasks.join() state.tasks.join()
if state.nodes: if state.nodes:
logger.debug('shutdown nodes')
state.nodes.join() state.nodes.join()
if PID and os.path.exists(PID): if PID and os.path.exists(PID):
logger.debug('remove %s', PID)
os.unlink(PID) os.unlink(PID)
signal.signal(signal.SIGTERM, shutdown) signal.signal(signal.SIGTERM, shutdown)