Update: 2026-07-10 03:04:06

This commit is contained in:
Hamza-Ayed
2026-07-10 03:04:06 +03:00
parent 2ff7450d0b
commit b18fd027b6
22 changed files with 2661 additions and 96 deletions
+18
View File
@@ -511,6 +511,24 @@ $io->on('workerStart', function () use ($io, $INTERNAL_KEY) {
$connection->send('OK');
// ── 7b. Get Ride State (Redis Cache Read-Only) ─────────
// Used by ride_server/intaleq/ride/rides/getRideStatus.php to
// answer passenger polling without hitting MySQL on every call.
} elseif ($action === 'get_ride_state') {
$rideId = (int)($post['ride_id'] ?? 0);
if ($rideId <= 0 || !$redis) {
$connection->send(json_encode(['status' => false, 'data' => null]));
return;
}
$stateData = $redis->hgetall("ride:{$rideId}:state");
$connection->send(json_encode([
'status' => !empty($stateData),
'data' => $stateData ?: null,
]));
// ── 5. Force Disconnect ───────────────────────────────
} elseif ($action === 'force_disconnect') {
$driverId = $post['driver_id'] ?? null;