Commit Graph

6 Commits

Author SHA1 Message Date
Mazyar 9c9245601b added functionality to limit the maximum number of notices per day 2026-02-22 10:55:03 +03:30
Nima Nakhostin 10fd53af41 Refactor Scraper Configuration and Command Line Handling
- Removed command line flag parsing for date range scraping in the scraper's main function.
- Introduced configuration fields for one-time scraping and date range (FromDate, ToDate) in the ScraperConfig struct.
- Updated the main function to utilize the new configuration fields, improving the clarity and maintainability of the scraping logic.
- This change enhances the scraper's functionality by centralizing configuration management and reducing command line complexity.
2025-11-23 14:17:45 +03:30
n.nakhostin 0747908873 Add AlertMail Configuration and Enhance TED Scraper Notification Logic
- Introduced AlertMail configuration in both scraper and worker bootstrap files, allowing for customizable email notifications.
- Updated the TED scraper to utilize the AlertMail configuration for sending completion notifications, improving flexibility in notification management.
- Enhanced error logging in the worker's main function to capture issues when listing Ollama models, ensuring better visibility into potential failures.
- Refactored notification sending logic to check for a valid AlertMail before dispatching emails, ensuring notifications are only sent when configured.
- Improved overall structure and readability of the bootstrap configuration files, aligning with best practices for maintainability.
2025-10-16 16:20:23 +03:30
n.nakhostin 05c7eae8a2 Add TED Scraper Configuration and Cron Scheduler Implementation
- Introduced a new configuration file for the TED scraper, defining database connection settings, logging preferences, and scraping parameters.
- Implemented a CronScheduler to manage scheduled tasks for TED operations, utilizing the robfig/cron library for scheduling.
- Added new entities and structures for handling TED XML data, including eForms and tender-related information, enhancing the scraper's functionality.
- Updated the main application to initialize the TED scraper with the new configuration and set up graceful shutdown handling.
- Removed the deprecated scraping implementation to streamline the codebase and focus on the new architecture.
2025-09-30 16:03:53 +03:30
n.nakhostin 57c29dc58f Refactor Configuration System to Use Environment Variables
- Removed YAML configuration files for the scraper and web commands, transitioning to an environment-based configuration system.
- Updated configuration structs to utilize `env` tags for loading values from `.env` files, enhancing security and flexibility.
- Implemented reflection-based parsing for environment variables, ensuring type-safe configuration loading.
- Revised documentation to reflect the new configuration approach, including usage examples and best practices for environment variable naming conventions.
2025-09-09 18:19:42 +03:30
n.nakhostin 45d2e84fd7 Implement Scraper Dockerfile and Refactor CI Configuration
- Added a new Dockerfile for the scraper application located at cmd/scraper/Dockerfile to streamline the build process.
- Updated the CI configuration in .drone.yml to correctly build the scraper application with the new Dockerfile.
- Refactored the main application entry point to utilize a new bootstrap package for configuration, logging, and MongoDB initialization.
- Enhanced the scraper's configuration management by defining a dedicated Config struct for better organization and maintainability.
2025-08-31 14:23:01 +03:30