Update codebase
This commit is contained in:
@@ -34,6 +34,14 @@ try {
|
||||
die("[PredictiveDemand] Connection failed: " . $e->getMessage() . "\n");
|
||||
}
|
||||
|
||||
// getRedisConnection() لا ترمي استثناءً — تُعيد null عند تعذّر الاتصال.
|
||||
// الإيقاف هنا مقصود: مفتاح مكافحة التكرار يعيش في Redis، وبدونه سيُعاد
|
||||
// إرسال نفس الإشعارات للركاب في كل تشغيل.
|
||||
if (!$redis) {
|
||||
error_log('[PredictiveDemand] ABORT: Redis unavailable — anti-spam guard would fail open.');
|
||||
die("[PredictiveDemand] Redis unavailable — aborting to avoid duplicate pushes.\n");
|
||||
}
|
||||
|
||||
echo "[PredictiveDemand] Starting...\n";
|
||||
|
||||
$GRID_SIZE = 0.01; // حجم الخلية (~1.1km)
|
||||
|
||||
Reference in New Issue
Block a user