mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
get this item status in the right action context
This commit is contained in:
parent
42d8e8dba4
commit
f89fe3a5ad
@ -1287,19 +1287,19 @@ class Uploader(QueueMixin):
|
|||||||
Possibly upload a single QueuedItem. If this returns False, the item is
|
Possibly upload a single QueuedItem. If this returns False, the item is
|
||||||
removed from _process_history.
|
removed from _process_history.
|
||||||
"""
|
"""
|
||||||
|
# Uploader
|
||||||
with PROCESS_ITEM(item=item).context():
|
with PROCESS_ITEM(item=item).context():
|
||||||
d = DeferredContext(defer.succeed(False))
|
d = DeferredContext(defer.succeed(False))
|
||||||
|
|
||||||
# Uploader
|
relpath_u = item.relpath_u
|
||||||
relpath_u = item.relpath_u
|
item.set_status('started', self._clock.seconds())
|
||||||
item.set_status('started', self._clock.seconds())
|
|
||||||
|
|
||||||
if relpath_u is None:
|
if relpath_u is None:
|
||||||
item.set_status('invalid_path', self._clock.seconds())
|
item.set_status('invalid_path', self._clock.seconds())
|
||||||
return d.addActionFinish()
|
return d.addActionFinish()
|
||||||
|
|
||||||
precondition(isinstance(relpath_u, unicode), relpath_u)
|
precondition(isinstance(relpath_u, unicode), relpath_u)
|
||||||
precondition(not relpath_u.endswith(u'/'), relpath_u)
|
precondition(not relpath_u.endswith(u'/'), relpath_u)
|
||||||
|
|
||||||
def _maybe_upload(ign, now=None):
|
def _maybe_upload(ign, now=None):
|
||||||
MAYBE_UPLOAD.log(relpath=relpath_u)
|
MAYBE_UPLOAD.log(relpath=relpath_u)
|
||||||
|
Loading…
Reference in New Issue
Block a user