修改log信息
This commit is contained in:
parent
cf78342db5
commit
83a97f7e5e
|
@ -18,8 +18,8 @@ from gettext import gettext as _
|
|||
import dbus,time
|
||||
from gi.repository import GLib
|
||||
|
||||
APTDAEMON_IDLE_CHECK_INTERVAL = 8
|
||||
APTDAEMON_IDLE_TIMEOUT = 2 * 10
|
||||
APTDAEMON_IDLE_CHECK_INTERVAL = 30
|
||||
APTDAEMON_IDLE_TIMEOUT = 10 * 60
|
||||
|
||||
class InstallBackendAptdaemon(InstallBackend):
|
||||
"""Makes use of aptdaemon to refresh the cache and to install updates."""
|
||||
|
@ -47,15 +47,16 @@ class InstallBackendAptdaemon(InstallBackend):
|
|||
"""Shutdown the daemon if it has been inactive for time specified
|
||||
in APTDAEMON_IDLE_TIMEOUT.
|
||||
"""
|
||||
logging.debug("Checking for inactivity")
|
||||
|
||||
if self.window_main.is_upgrading == False:
|
||||
logging.error("quit")
|
||||
logging.warning("Installing to exit and timeout check quit...")
|
||||
return False
|
||||
|
||||
if self.trans_progress != self.static_progress:
|
||||
self.static_progress = self.trans_progress
|
||||
self.last_action_timestamp = time.time()
|
||||
|
||||
logging.debug("Checking for inactivity")
|
||||
timestamp = self.last_action_timestamp
|
||||
if (time.time() - timestamp > APTDAEMON_IDLE_TIMEOUT):
|
||||
logging.info("Quitting due to inactivity")
|
||||
|
|
Loading…
Reference in New Issue