mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-25 21:59:19 +00:00
oops @log_call is not Deferred friendly
This commit is contained in:
parent
92cf9b8232
commit
436b91b463
@ -771,6 +771,20 @@ ALL_FILES = MessageType(
|
|||||||
u"A record of the rough state of the local database at the time of downloader start up.",
|
u"A record of the rough state of the local database at the time of downloader start up.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
START_DOWNLOADING = ActionType(
|
||||||
|
u"magic-folder:start-downloading",
|
||||||
|
[_NICKNAME, _DIRECTION],
|
||||||
|
[],
|
||||||
|
u"A Magic-Folder downloader is initializing and beginning to manage downloads.",
|
||||||
|
)
|
||||||
|
|
||||||
|
PERFORM_SCAN = ActionType(
|
||||||
|
u"magic-folder:perform-scan",
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
u"Remote storage is being scanned for changes which need to be synchronized.",
|
||||||
|
)
|
||||||
|
|
||||||
class QueueMixin(HookMixin):
|
class QueueMixin(HookMixin):
|
||||||
"""
|
"""
|
||||||
A parent class for Uploader and Downloader that handles putting
|
A parent class for Uploader and Downloader that handles putting
|
||||||
@ -1551,9 +1565,10 @@ class Downloader(QueueMixin, WriteFileMixin):
|
|||||||
self._status_reporter = status_reporter
|
self._status_reporter = status_reporter
|
||||||
self._poll_interval = poll_interval
|
self._poll_interval = poll_interval
|
||||||
|
|
||||||
@log_call
|
|
||||||
@eliotutil.inline_callbacks
|
@eliotutil.inline_callbacks
|
||||||
def start_downloading(self):
|
def start_downloading(self):
|
||||||
|
action = START_DOWNLOADING(**self._log_fields)
|
||||||
|
with action:
|
||||||
ALL_FILES.log(files=self._db.get_all_relpaths())
|
ALL_FILES.log(files=self._db.get_all_relpaths())
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
@ -1714,9 +1729,9 @@ class Downloader(QueueMixin, WriteFileMixin):
|
|||||||
def _scan_delay(self):
|
def _scan_delay(self):
|
||||||
return self._poll_interval
|
return self._poll_interval
|
||||||
|
|
||||||
@log_call
|
|
||||||
@eliotutil.inline_callbacks
|
@eliotutil.inline_callbacks
|
||||||
def _perform_scan(self):
|
def _perform_scan(self):
|
||||||
|
with PERFORM_SCAN():
|
||||||
try:
|
try:
|
||||||
yield self._scan_remote_collective()
|
yield self._scan_remote_collective()
|
||||||
self._status_reporter(
|
self._status_reporter(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user