Update: 2026-08-02 22:51:18

This commit is contained in:
Hamza-Ayed
2026-08-02 22:51:18 +03:00
parent c9af364cbc
commit 2c962bf80a
39 changed files with 627 additions and 191 deletions
+8
View File
@@ -18,6 +18,14 @@ try {
die("Connection failed: " . $e->getMessage() . "\n");
}
// getRedisConnection() تُعيد المتغير العام $redis فقط، وbootstrap.php يتركه null
// عند فشل الاتصال — فهي لا ترمي استثناءً والـ try/catch أعلاه لا يلتقط شيئاً.
// بدون هذا الفحص كان السكربت ينهار فوراً بـ "call to a member function get() on null".
if (!$redis) {
error_log('[cron_kazan_adjuster] ABORT: Redis unavailable — Kazan discounts left untouched.');
die("Redis unavailable — aborting without touching Kazan discounts.\n");
}
$countries = ['SY', 'JO', 'EG', 'IQ'];
foreach ($countries as $country) {