forked from LBRYCommunity/lbry-sdk
bump version, increase log size, fix shutdown problem
This commit is contained in:
parent
29f7307f9d
commit
a82f85f058
3 changed files with 8 additions and 11 deletions
|
@ -4,5 +4,5 @@ import logging
|
|||
logging.getLogger(__name__).addHandler(logging.NullHandler())
|
||||
|
||||
|
||||
version = (0, 2, 2)
|
||||
version = (0, 2, 3)
|
||||
__version__ = ".".join([str(x) for x in version])
|
||||
|
|
|
@ -68,7 +68,7 @@ else:
|
|||
PREVIOUS_LOG = 0
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=262144, backupCount=5)
|
||||
handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=2097152, backupCount=5)
|
||||
log.addHandler(handler)
|
||||
log.setLevel(logging.INFO)
|
||||
|
||||
|
@ -541,10 +541,6 @@ class LBRYDaemon(jsonrpc.JSONRPC):
|
|||
log.info("Closing lbrynet session")
|
||||
log.info("Status at time of shutdown: " + self.startup_status[0])
|
||||
|
||||
self.internet_connection_checker.stop()
|
||||
self.version_checker.stop()
|
||||
self.connection_problem_checker.stop()
|
||||
|
||||
d = self._upload_log(name_prefix="close", exclude_previous=False if self.first_run else True)
|
||||
d.addCallback(lambda _: self._stop_server())
|
||||
d.addErrback(lambda err: log.info("Bad server shutdown: " + err.getTraceback()))
|
||||
|
@ -1022,9 +1018,10 @@ class LBRYDaemon(jsonrpc.JSONRPC):
|
|||
Args:
|
||||
None
|
||||
Returns:
|
||||
'status_message': startup status message
|
||||
'status_code': status_code
|
||||
if status_code is 'loading_wallet', also contains key 'progress': blockchain catchup progress
|
||||
'message': startup status message
|
||||
'code': status_code
|
||||
'progress': progress, only used in loading_wallet
|
||||
'is_lagging': flag set to indicate lag, if set message will contain relevant message
|
||||
"""
|
||||
|
||||
r = {'code': self.startup_status[0], 'message': self.startup_status[1], 'progress': None, 'is_lagging': None}
|
||||
|
@ -1263,7 +1260,7 @@ class LBRYDaemon(jsonrpc.JSONRPC):
|
|||
|
||||
d = self._shutdown()
|
||||
d.addCallback(lambda _: _disp_shutdown())
|
||||
d.addCallback(lambda _: reactor.callLater(1.0, reactor.stop))
|
||||
d.addCallback(lambda _: reactor.callLater(0.0, reactor.stop))
|
||||
|
||||
return self._render_response("Shutting down", OK_CODE)
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ if not os.path.isdir(log_dir):
|
|||
|
||||
LOG_FILENAME = os.path.join(log_dir, 'lbrynet-daemon.log')
|
||||
log = logging.getLogger(__name__)
|
||||
handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=262144, backupCount=5)
|
||||
handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=2097152, backupCount=5)
|
||||
log.addHandler(handler)
|
||||
log.setLevel(logging.INFO)
|
||||
|
||||
|
|
Loading…
Reference in a new issue