Update: 2026-07-10 03:04:06
This commit is contained in:
@@ -226,6 +226,17 @@ try {
|
||||
|
||||
error_log("[add_ride] ride DB insert success. RideID=$insertedId");
|
||||
|
||||
// 🆕 Seed initial ride state in Redis — fired as early as possible so
|
||||
// getRideStatus polling has a cache entry from the first poll onward.
|
||||
// Uses $status/$driver_id/$passenger_id, the exact values just written
|
||||
// to MySQL above, not hardcoded literals.
|
||||
sendToLocationServer('update_ride_state', [
|
||||
'ride_id' => $insertedId,
|
||||
'status' => $status,
|
||||
'driver_id' => $driver_id,
|
||||
'passenger_id' => $passenger_id,
|
||||
]);
|
||||
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
// STEP B — primary DB ثانياً (نسخة أرشيفية بنفس الـ ID)
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user