mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 15:55:49 -04:00
black'd
This commit is contained in:
parent
6a0b0b058d
commit
9983f43c75
@ -113,9 +113,13 @@ class BrozzlerWorker:
|
||||
|
||||
# set up metrics
|
||||
if self._metrics_port > 0:
|
||||
metrics.register_prom_metrics(self._metrics_port, self._registry_url, self._env)
|
||||
metrics.register_prom_metrics(
|
||||
self._metrics_port, self._registry_url, self._env
|
||||
)
|
||||
else:
|
||||
logging.warning("not starting prometheus scrape endpoint: metrics_port is undefined")
|
||||
logging.warning(
|
||||
"not starting prometheus scrape endpoint: metrics_port is undefined"
|
||||
)
|
||||
|
||||
def _choose_warcprox(self):
|
||||
warcproxes = self._service_registry.available_services("warcprox")
|
||||
|
@ -373,7 +373,7 @@ def _try_youtube_dl(worker, ydl, site, page):
|
||||
"yt-dlp hit error extracting info for %s" % ydl.url
|
||||
)
|
||||
else:
|
||||
retry_wait = min(60, YTDLP_WAIT * (1.5**(attempt - 1)))
|
||||
retry_wait = min(60, YTDLP_WAIT * (1.5 ** (attempt - 1)))
|
||||
logging.info(
|
||||
"Attempt %s failed. Retrying in %s seconds...",
|
||||
attempt,
|
||||
@ -381,7 +381,9 @@ def _try_youtube_dl(worker, ydl, site, page):
|
||||
)
|
||||
time.sleep(retry_wait)
|
||||
else:
|
||||
raise brozzler.VideoExtractorError("yt-dlp hit unknown error extracting info for %s" % ydl.url)
|
||||
raise brozzler.VideoExtractorError(
|
||||
"yt-dlp hit unknown error extracting info for %s" % ydl.url
|
||||
)
|
||||
|
||||
logging.info("ytdlp completed successfully")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user