mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-07-21 06:00:45 -04:00
Merge branch 'predup_type_playlist' into qa
This commit is contained in:
commit
43b3e86589
2 changed files with 5 additions and 3 deletions
|
@ -91,7 +91,7 @@ class BrozzlerWorker:
|
|||
self._service_registry = service_registry
|
||||
self._ytdlp_proxy_endpoints = ytdlp_proxy_endpoints
|
||||
self._max_browsers = max_browsers
|
||||
if VIDEO_DATA_SOURCE and VIDEO_DATA_SOURCE.startswith("postgresql"):
|
||||
if self.VIDEO_DATA_SOURCE and self.VIDEO_DATA_SOURCE.startswith("postgresql"):
|
||||
self._video_data = VideoDataClient()
|
||||
|
||||
self._warcprox_auto = warcprox_auto
|
||||
|
|
|
@ -24,7 +24,7 @@ import tempfile
|
|||
import threading
|
||||
import time
|
||||
import urllib.request
|
||||
from typing import Any, Bool, List, Optional
|
||||
from typing import Any, List, Optional
|
||||
|
||||
import doublethink
|
||||
import psycopg
|
||||
|
@ -79,8 +79,10 @@ class VideoDataClient:
|
|||
import psycopg
|
||||
from psycopg_pool import ConnectionPool, PoolTimeout
|
||||
|
||||
VIDEO_DATA_SOURCE = os.getenv("VIDEO_DATA_SOURCE")
|
||||
|
||||
def __init__(self):
|
||||
pool = ConnectionPool(VIDEO_DATA_SOURCE, min_size=1, max_size=9)
|
||||
pool = ConnectionPool(self.VIDEO_DATA_SOURCE, min_size=1, max_size=9)
|
||||
pool.wait()
|
||||
logger.info("pg pool ready")
|
||||
# atexit.register(pool.close)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue