From f89fe3a5addac29bb2e065cd21368ca67e6eb6f4 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Tue, 26 Feb 2019 15:10:24 -0500 Subject: [PATCH] get this item status in the right action context --- src/allmydata/frontends/magic_folder.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index f2e888982..ba0408cd0 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -1287,19 +1287,19 @@ class Uploader(QueueMixin): Possibly upload a single QueuedItem. If this returns False, the item is removed from _process_history. """ + # Uploader with PROCESS_ITEM(item=item).context(): d = DeferredContext(defer.succeed(False)) - # Uploader - relpath_u = item.relpath_u - item.set_status('started', self._clock.seconds()) + relpath_u = item.relpath_u + item.set_status('started', self._clock.seconds()) - if relpath_u is None: - item.set_status('invalid_path', self._clock.seconds()) - return d.addActionFinish() + if relpath_u is None: + item.set_status('invalid_path', self._clock.seconds()) + return d.addActionFinish() - precondition(isinstance(relpath_u, unicode), relpath_u) - precondition(not relpath_u.endswith(u'/'), relpath_u) + precondition(isinstance(relpath_u, unicode), relpath_u) + precondition(not relpath_u.endswith(u'/'), relpath_u) def _maybe_upload(ign, now=None): MAYBE_UPLOAD.log(relpath=relpath_u)