mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 13:33:09 +00:00
Cut the cost of this logging when logging is disabled
This commit is contained in:
parent
3ab7138598
commit
81ca822edf
@ -522,10 +522,11 @@ MAYBE_UPLOAD = MessageType(
|
|||||||
u"A decision is being made about whether to upload a file.",
|
u"A decision is being made about whether to upload a file.",
|
||||||
)
|
)
|
||||||
|
|
||||||
PENDING = Field.for_types(
|
PENDING = Field(
|
||||||
u"pending",
|
u"pending",
|
||||||
[list],
|
lambda s: list(s),
|
||||||
u"The paths which are pending processing.",
|
u"The paths which are pending processing.",
|
||||||
|
eliotutil.validateInstanceOf(set),
|
||||||
)
|
)
|
||||||
|
|
||||||
REMOVE_FROM_PENDING = ActionType(
|
REMOVE_FROM_PENDING = ActionType(
|
||||||
@ -1337,7 +1338,7 @@ class Uploader(QueueMixin):
|
|||||||
pathinfo = get_pathinfo(unicode_from_filepath(fp))
|
pathinfo = get_pathinfo(unicode_from_filepath(fp))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with REMOVE_FROM_PENDING(relpath=relpath_u, pending=list(self._pending)):
|
with REMOVE_FROM_PENDING(relpath=relpath_u, pending=self._pending):
|
||||||
self._pending.remove(relpath_u)
|
self._pending.remove(relpath_u)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user