Class: IntegrityCheckWorker
- Inherits:
-
Object
- Object
- IntegrityCheckWorker
- Includes:
- Sidekiq::Job
- Defined in:
- app/workers/integrity_check_worker.rb
Overview
Periodic integrity check for critical database records.
Scheduled via Sidekiq scheduler to run regularly.
Checks:
- ItemConstants::PROTECTED_SKUS exist in items table
- ProductLineUrls.all_paths exist in product_lines table (slug_ltree)
- PurchaseOrder::CARRIERS exist in suppliers table
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/workers/integrity_check_worker.rb', line 12 def perform = [] # Check protected SKUs .concat(check_protected_skus) # Check product line URLs .concat(check_product_line_urls) # Check carriers .concat(check_carriers) Mailer.admin_notification('Integrity Check Errors', .join("\n")) if .present? end |