add bounding, env var config

This commit is contained in:
Bruce Röttgers
2025-04-18 13:35:16 +02:00
parent 3bfd30a073
commit e0aa134ecc
6 changed files with 134 additions and 37 deletions

View File

@@ -1,2 +1,2 @@
from .base_handler import BaseHandler
from .filesystm_handler import FileSystemHandler
from .filesystem import FilesystemHandler

View File

@@ -2,8 +2,9 @@
from pathlib import Path
import aiofiles
from .base_handler import BaseHandler
import json
class FileSystemHandler(BaseHandler):
class FilesystemHandler(BaseHandler):
"""
Handler that writes files to the filesystem.
"""
@@ -36,7 +37,7 @@ class FileSystemHandler(BaseHandler):
try:
file_path = self.output_dir / f"{uid}.json"
async with aiofiles.open(file_path, 'w') as f:
await f.write(entry)
await f.write(json.dumps(entry))
return True
except IOError as e:
self.logger.error(f"Error writing entry {uid}: {e}")