Merge branch 'predup_type_playlist' into qa

This commit is contained in:
Barbara Miller 2025-07-15 19:31:31 -07:00
commit 43b3e86589
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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)