Update: 2026-07-22 00:39:28

This commit is contained in:
Hamza-Ayed
2026-07-22 00:39:28 +03:00
parent 58222fbf81
commit 16101927e1
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ function broadcastRideToMarket($rideId, $lat, $lng, $payloadData, $extraMarketDa
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 200);
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 2000);
if ($INTERNAL_KEY) {
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-internal-key: $INTERNAL_KEY"]);
}
+11
View File
@@ -127,6 +127,17 @@ async function simulateTrip(tripIndex) {
socket.on('connect', async () => {
console.log(`[Trip ${tripIndex}] ✅ Driver connected to socket.`);
// Register driver location in Redis available pool
socket.emit('update_location', {
lat: 31.95,
lng: 35.91,
heading: 90,
speed: 0,
status: 'off'
});
await new Promise(r => setTimeout(r, 200));
// 2. Passenger Requests Ride
try {
const addRideFormData = new URLSearchParams({