Update: 2026-08-01 18:37:02
This commit is contained in:
@@ -368,8 +368,10 @@ $io->on('workerStart', function () use ($io, $INTERNAL_KEY) {
|
||||
|
||||
if ($st === 'off') {
|
||||
$pipe->geoadd('geo:drivers:available', $lng, $lat, $driverId);
|
||||
logMsg("[REDIS BATCH] Added Driver $driverId to geo:drivers:available at $lat, $lng");
|
||||
} elseif ($st === 'on') {
|
||||
$pipe->geoadd('geo:drivers:busy', $lng, $lat, $driverId);
|
||||
logMsg("[REDIS BATCH] Added Driver $driverId to geo:drivers:busy at $lat, $lng");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -876,6 +878,8 @@ $io->on('connection', function ($socket) use ($INTERNAL_KEY) {
|
||||
|
||||
$state = &$driverState[$driverId];
|
||||
$now = time();
|
||||
|
||||
logMsg("[SOCKET] update_location received for Driver $driverId | status=$status, lat=$lat, lng=$lng");
|
||||
|
||||
// 1. Forward للراكب (ASYNC + throttle)
|
||||
if (!empty($passengerId)) {
|
||||
|
||||
Reference in New Issue
Block a user