• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lbryio / lbry-sdk / 3788717008

pending completion
3788717008

Pull #3711

github

GitHub
Merge 69297ea9c into 625865165
Pull Request #3711: Bump to Python 3.9 attempt 3.

2802 of 6558 branches covered (42.73%)

Branch coverage included in aggregate %.

25 of 41 new or added lines in 17 files covered. (60.98%)

33 existing lines in 9 files now uncovered.

12281 of 19915 relevant lines covered (61.67%)

1.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.59
/lbry/stream/background_downloader.py
1
import asyncio
3✔
2
import logging
3✔
3

4
from lbry.stream.downloader import StreamDownloader
3✔
5

6

7
log = logging.getLogger(__name__)
3✔
8

9

10
class BackgroundDownloader:
3✔
11
    def __init__(self, conf, storage, blob_manager, dht_node=None):
3✔
12
        self.storage = storage
×
13
        self.blob_manager = blob_manager
×
14
        self.node = dht_node
×
15
        self.conf = conf
×
16

17
    async def download_blobs(self, sd_hash):
3✔
18
        downloader = StreamDownloader(asyncio.get_running_loop(), self.conf, self.blob_manager, sd_hash)
×
19
        try:
×
20
            await downloader.start(self.node, save_stream=False)
×
21
            for blob_info in downloader.descriptor.blobs[:-1]:
×
22
                await downloader.download_stream_blob(blob_info)
×
23
        except ValueError:
×
24
            return
×
25
        except asyncio.CancelledError:
×
NEW
26
            log.debug("Cancelled background downloader")
×
27
            raise
×
28
        except Exception:
×
29
            log.error("Unexpected download error on background downloader")
×
30
        finally:
31
            downloader.stop()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc