mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-22 18:22:40 +00:00
Add missing chk_upload, document two new attrs, and move them up
This commit is contained in:
parent
9a18843bb1
commit
5a51d98479
@ -496,6 +496,14 @@ class Helper(Referenceable):
|
|||||||
:ivar dict[bytes, CHKUploadHelper] _active_uploads: For any uploads which
|
:ivar dict[bytes, CHKUploadHelper] _active_uploads: For any uploads which
|
||||||
have been started but not finished, a mapping from storage index to the
|
have been started but not finished, a mapping from storage index to the
|
||||||
upload helper.
|
upload helper.
|
||||||
|
|
||||||
|
:ivar chk_checker: A callable which returns an object like a
|
||||||
|
CHKCheckerAndUEBFetcher instance which can check CHK shares.
|
||||||
|
Primarily for the convenience of tests to override.
|
||||||
|
|
||||||
|
:ivar chk_upload: A callable which returns an object like a
|
||||||
|
CHKUploadHelper instance which can upload CHK shares. Primarily for
|
||||||
|
the convenience of tests to override.
|
||||||
"""
|
"""
|
||||||
# this is the non-distributed version. When we need to have multiple
|
# this is the non-distributed version. When we need to have multiple
|
||||||
# helpers, this object will become the HelperCoordinator, and will query
|
# helpers, this object will become the HelperCoordinator, and will query
|
||||||
@ -510,6 +518,9 @@ class Helper(Referenceable):
|
|||||||
}
|
}
|
||||||
MAX_UPLOAD_STATUSES = 10
|
MAX_UPLOAD_STATUSES = 10
|
||||||
|
|
||||||
|
chk_checker = CHKCheckerAndUEBFetcher
|
||||||
|
chk_upload = CHKUploadHelper
|
||||||
|
|
||||||
def __init__(self, basedir, storage_broker, secret_holder,
|
def __init__(self, basedir, storage_broker, secret_holder,
|
||||||
stats_provider, history):
|
stats_provider, history):
|
||||||
self._basedir = basedir
|
self._basedir = basedir
|
||||||
@ -601,8 +612,6 @@ class Helper(Referenceable):
|
|||||||
d.addErrback(_err)
|
d.addErrback(_err)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
chk_checker = CHKCheckerAndUEBFetcher
|
|
||||||
|
|
||||||
def _check_chk(self, storage_index, lp):
|
def _check_chk(self, storage_index, lp):
|
||||||
# see if this file is already in the grid
|
# see if this file is already in the grid
|
||||||
lp2 = self.log("doing a quick check+UEBfetch",
|
lp2 = self.log("doing a quick check+UEBfetch",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user