From: David Stainton Date: Fri, 3 Jul 2015 02:52:21 +0000 (-0700) Subject: fix test_persistence X-Git-Url: https://git.rkrishnan.org/htmlfontify-example.html?a=commitdiff_plain;h=a8d92fd03d56bc83c13e6cd504fa559260bdcf33;p=tahoe-lafs%2Ftahoe-lafs.git fix test_persistence --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 208b9cbf..f7373f24 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -46,7 +46,7 @@ class MagicFolder(service.MultiService): service.MultiService.__init__(self) self._stopped = False - self._remote_scan_delay = 10 # XXX + self._remote_scan_delay = 3 # XXX self._local_dir = abspath_expanduser_unicode(local_dir) self._upload_lazy_tail = defer.succeed(None) self._upload_pending = set() @@ -207,6 +207,8 @@ class MagicFolder(service.MultiService): filecap = r.was_uploaded() if filecap is False: return False + else: + return True def _scan(self, localpath): if not os.path.isdir(localpath): @@ -272,7 +274,7 @@ class MagicFolder(service.MultiService): self._log("magic folder upload deque is now empty") self._download_lazy_tail = defer.succeed(None) self._download_lazy_tail.addCallback(lambda ign: task.deferLater(reactor, self._remote_scan_delay, self._scan_remote_collective)) - #self._download_lazy_tail.addCallback(lambda ign: task.deferLater(reactor, 0, self._turn_download_deque)) + self._download_lazy_tail.addCallback(lambda ign: task.deferLater(reactor, 0, self._turn_download_deque)) return self._download_lazy_tail.addCallback(lambda ign: task.deferLater(reactor, 0, self._download_file, file_path, file_node)) self._download_lazy_tail.addCallback(lambda ign: task.deferLater(reactor, self._remote_scan_delay, self._turn_download_deque)) @@ -344,7 +346,6 @@ class MagicFolder(service.MultiService): d2.addCallback(get_metadata) def set_deleted(metadata): current_version = self._db.get_local_file_version(path) + 1 - print "current version ", current_version metadata['version'] = current_version metadata['deleted'] = True emptyUploadable = Data("", self._convergence)