Tue Aug 31 12:48:30 CEST 2010 francois@ctrlaltdel.ch * DownloadStatus: show active immutable downloads in Active Operations, Fix #1172 New patches: [DownloadStatus: show active immutable downloads in Active Operations, Fix #1172 francois@ctrlaltdel.ch**20100831104830 Ignore-this: a7d3602dd7418304dc7f517c7e7ab7fb ] { hunk ./src/allmydata/immutable/downloader/status.py 205 def using_helper(self): return False + def get_active(self): hunk ./src/allmydata/immutable/downloader/status.py 207 - return False # TODO + # a download is considered active if it has at least one outstanding + # read() call + for r_ev in self.read_events: + (ign1, ign2, ign3, finishtime, ign4, ign5, ign6) = r_ev + if finishtime is None: + return True + return False + def get_started(self): return self.started def get_results(self): hunk ./src/allmydata/test/test_download.py 1261 e2.finished(now+5) self.failUnlessEqual(ds.get_progress(), 1.0) + def test_active(self): + now = 12345.1 + ds = DownloadStatus("si-1", 123) + self.failUnlessEqual(ds.get_active(), False) + e1 = ds.add_read_event(0, 1000, now) + self.failUnlessEqual(ds.get_active(), True) + e2 = ds.add_read_event(1, 1000, now+1) + self.failUnlessEqual(ds.get_active(), True) + e1.finished(now+2) + self.failUnlessEqual(ds.get_active(), True) + e2.finished(now+3) + self.failUnlessEqual(ds.get_active(), False) + } Context: [_auto_deps.py: change pycrypto version requirement to avoid https://bugs.launchpad.net/pycrypto/+bug/620253 david-sarah@jacaranda.org**20100829230038 Ignore-this: e58f98ef262444067fc4b31fad23e40b ] [docs: update NEWS a bit about New-Downloader zooko@zooko.com**20100819021446 Ignore-this: 31a6e2fb0a6e3d19f73481e99070da7a ] [misc: add benchmarking tool for spans zooko@zooko.com**20100819021420 Ignore-this: 569327a1908a07e5fb634526bed515b2 ] [web: refactor rate computation, fixes #1166 francois@ctrlaltdel.ch**20100815141933 Ignore-this: d25491858e137894142eaa67c75b0439 ] [docs: doc of the download status page zooko@zooko.com**20100814054117 Ignore-this: a82ec33da3c39a7c0d47a7a6b5f81bbb ref: http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1169#comment:1 ] [docs: NEWS: edit English usage, remove ticket numbers for regressions vs. 1.7.1 that were fixed again before 1.8.0c2 zooko@zooko.com**20100811071758 Ignore-this: 993f5a1e6a9535f5b7a0bd77b93b66d0 ] [docs: NEWS: more detail about new-downloader zooko@zooko.com**20100811071303 Ignore-this: 9f07da4dce9d794ce165aae287f29a1e ] [TAG allmydata-tahoe-1.8.0c2 david-sarah@jacaranda.org**20100810073847 Ignore-this: c37f732b0e45f9ebfdc2f29c0899aeec ] Patch bundle hash: 252ac131ed5597e14f7d7f385186f38d921f3a56