reflow for changed indentation level

This commit is contained in:
Jean-Paul Calderone 2019-03-18 19:21:05 -04:00
parent 8814261e18
commit 20ba53f586

View File

@ -973,16 +973,15 @@ class QueueMixin(HookMixin):
with action.context():
d = DeferredContext(defer.Deferred())
# During startup we scanned the collective for items to
# download. We do not need to perform another scan before
# processing our work queue. More importantly, the logic for
# determining which items to download is *not correct* in the
# case where two scans are performed with no intermediate
# emptying of the work queue. Therefore, skip the scan in the
# first processing iteration. Either there will be work in
# the queue from the initial scan or not. Either way, when we
# get here again on the next iteration, we'll go the other way
# and perform a scan.
# During startup we scanned the collective for items to download.
# We do not need to perform another scan before processing our
# work queue. More importantly, the logic for determining which
# items to download is *not correct* in the case where two scans
# are performed with no intermediate emptying of the work queue.
# Therefore, skip the scan in the first processing iteration.
# Either there will be work in the queue from the initial scan or
# not. Either way, when we get here again on the next iteration,
# we'll go the other way and perform a scan.
if not self._deque:
# adds items to our deque
d.addCallback(lambda ignored: self._perform_scan())