mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-16 12:21:13 +00:00
Don't log bytes in status.
This commit is contained in:
parent
34bdf5c75a
commit
91c6e1d29f
4 changed files with 5 additions and 14 deletions
|
|
@ -42,8 +42,7 @@ class StatusLogger (object):
|
|||
"""Save file descriptor for logging."""
|
||||
self.fd = fd
|
||||
|
||||
def log_status (self, checked, in_progress, queue, duration,
|
||||
downloaded_bytes):
|
||||
def log_status (self, checked, in_progress, queue, duration):
|
||||
"""Write status message to file descriptor."""
|
||||
msg = _n("%2d thread active", "%2d threads active", in_progress) % \
|
||||
in_progress
|
||||
|
|
@ -53,8 +52,6 @@ class StatusLogger (object):
|
|||
msg = _n("%4d link checked", "%4d links checked", checked) % checked
|
||||
self.write(u"%s, " % msg)
|
||||
msg = _("runtime %s") % strformat.strduration_long(duration)
|
||||
self.write(u"%s, " % msg)
|
||||
msg = _("downloaded %s") % strformat.strsize(downloaded_bytes)
|
||||
self.writeln(msg)
|
||||
self.flush()
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,4 @@ class Status (task.LoggedCheckedTask):
|
|||
"""Log a status message."""
|
||||
duration = time.time() - self.start_time
|
||||
checked, in_progress, queue = self.aggregator.urlqueue.status()
|
||||
downloaded_bytes = self.aggregator.downloaded_bytes
|
||||
self.logger.log_status(checked, in_progress, queue, duration,
|
||||
downloaded_bytes)
|
||||
self.logger.log_status(checked, in_progress, queue, duration)
|
||||
|
|
|
|||
|
|
@ -569,13 +569,11 @@ Version 2 or later.
|
|||
"""Show given link in status bar."""
|
||||
self.statusBar.showMessage(link)
|
||||
|
||||
def log_status (self, checked, in_progress, queued, duration,
|
||||
downloaded_bytes):
|
||||
def log_status (self, checked, in_progress, queued, duration):
|
||||
"""Update number of checked, active and queued links."""
|
||||
self.label_checked.setText(u"%d" % checked)
|
||||
self.label_active.setText(u"%d" % in_progress)
|
||||
self.label_queued.setText(u"%d" % queued)
|
||||
# XXX display downloaded bytes
|
||||
|
||||
def log_stats (self, statistics):
|
||||
"""Set statistic information for selected URL."""
|
||||
|
|
|
|||
|
|
@ -68,8 +68,6 @@ class StatusLogger (object):
|
|||
"""Store given signal object."""
|
||||
self.signal = signal
|
||||
|
||||
def log_status (self, checked, in_progress, queued, duration,
|
||||
downloaded_bytes):
|
||||
def log_status (self, checked, in_progress, queued, duration):
|
||||
"""Emit signal with given status information."""
|
||||
self.signal.emit(checked, in_progress, queued, duration,
|
||||
downloaded_bytes)
|
||||
self.signal.emit(checked, in_progress, queued, duration)
|
||||
|
|
|
|||
Loading…
Reference in a new issue