mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
only keep history for items that are processed
This commit is contained in:
parent
bcdd15394b
commit
8ac63cf5bd
@ -432,8 +432,11 @@ class QueueMixin(HookMixin):
|
||||
self._log(" processing '%r'" % (item,))
|
||||
proc = yield self._process(item)
|
||||
self._log(" done: %r" % proc)
|
||||
if not proc:
|
||||
self._process_history.remove(item)
|
||||
except Exception as e:
|
||||
log.err("processing '%r' failed: %s" % (item, e))
|
||||
item.set_status('failed', self._clock.seconds())
|
||||
proc = Failure()
|
||||
|
||||
self._call_hook(proc, 'processed')
|
||||
@ -668,6 +671,10 @@ class Uploader(QueueMixin):
|
||||
self._call_hook(path, 'inotify')
|
||||
|
||||
def _process(self, item):
|
||||
"""
|
||||
process a single QueuedItem. If this returns False, the item is
|
||||
removed from _process_history
|
||||
"""
|
||||
# Uploader
|
||||
relpath_u = item.relpath_u
|
||||
self._log("_process(%r)" % (relpath_u,))
|
||||
|
Loading…
Reference in New Issue
Block a user