Zombie processes, quot parser issue

This commit is contained in:
Luciano Gervasoni
2025-07-03 10:56:48 +02:00
parent 8b689729bf
commit e657c3bee1
3 changed files with 9 additions and 2 deletions

View File

@@ -88,8 +88,11 @@ class MissingKidsFetcher():
# Release memory
try:
driver.close()
driver.quit() #driver.close()
time.sleep(1)
# import atexit
# atexit.register(driver.quit) # Will always be called on exit
except Exception as e:
logger.warning("Exception while closing driver: {}".format(str(e)), exc_info=True)
logger.warning("Exception while closing/quitting driver: {}".format(str(e)), exc_info=True)
return set_urls

View File

@@ -18,6 +18,9 @@ class FetchParser():
# Ensure URL host in URL
raw_urls = [u for u in raw_urls if url_host_clean in u]
# Clean if ends with "&quot"
raw_urls = [u.replace("&quot", "") if u.endswith("&quot") else u for u in raw_urls]
return raw_urls
def run(self):

View File

@@ -11,6 +11,7 @@ services:
container_name: fetcher_app_selenium
restart: unless-stopped
shm_size: 512mb
init: true # For zombie processes
environment:
- SELENIUM_SLEEP_PER_PAGE=${SELENIUM_SLEEP_PER_PAGE}
- PATH_LOGS_DIRECTORY=${PATH_LOGS_DIRECTORY}