Files
adsPRO/docs/CRON_QUEUE.md
Jacek Pyziak fd0db9b145 feat: Add Supplemental Feeds feature with UI and backend support
- Implemented the main view for Supplemental Feeds, displaying clients with Merchant Account IDs and their associated feed files.
- Added styling for the feeds page and its components, including headers, empty states, and dropdown menus for syncing actions.
- Created backend logic to generate supplemental feeds for clients, including file handling and data sanitization.
- Integrated new routes and views for managing feeds, ensuring proper data retrieval and display.
- Updated navigation to include the new Supplemental Feeds section.
- Added necessary documentation for CRON job management related to feed generation.
2026-02-26 20:17:13 +01:00

28 lines
1.2 KiB
Markdown

# Kolejka Cron (DB)
## Cel
- Zadania cron sa zapisywane w bazie (`cron_jobs`) i planowane przez harmonogram (`cron_schedules`).
- Aktualnie domyslnie dziala zadanie: `product_links_health_check` (co 7 dni).
## Tabele
- `cron_jobs` - kolejka zadan z priorytetem, retry i backoff.
- `cron_schedules` - definicje cyklicznych zadan.
- `product_link_alerts` - alerty dla nieistniejacych powiazan produktu.
## Uruchamianie
- Jednorazowo: `php bin/cron.php`
- Z limitem batcha: `php bin/cron.php --limit=50`
- Z panelu (`Ustawienia -> Cron`) mozna wlaczyc uruchamianie workera podczas requestow HTTP.
## Zalecenie dla systemowego crona
- Uruchamiaj `php /sciezka/do/orderPRO/bin/cron.php` co 1-5 minut.
- Harmonogram 7-dniowy jest liczony przez `cron_schedules.next_run_at`, wiec sam worker powinien byc uruchamiany regularnie.
## Jak dziala `product_links_health_check`
1. Pobiera aktywne integracje `shoppro` z API key.
2. Odswieza cache ofert (`channel_offers`) przez import API.
3. Czyści nieaktualne rekordy ofert z cache.
4. Weryfikuje aktywne powiazania `product_channel_map`.
5. Dla brakujacych powiazan ustawia alert `missing_remote_link`.
6. Dla przywroconych powiazan zamyka alert.