Update: 2026-07-22 00:39:28
This commit is contained in:
@@ -44,7 +44,7 @@ function broadcastRideToMarket($rideId, $lat, $lng, $payloadData, $extraMarketDa
|
|||||||
curl_setopt($ch, CURLOPT_POST, 1);
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
|
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postData));
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 200);
|
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 2000);
|
||||||
if ($INTERNAL_KEY) {
|
if ($INTERNAL_KEY) {
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-internal-key: $INTERNAL_KEY"]);
|
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-internal-key: $INTERNAL_KEY"]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,6 +127,17 @@ async function simulateTrip(tripIndex) {
|
|||||||
socket.on('connect', async () => {
|
socket.on('connect', async () => {
|
||||||
console.log(`[Trip ${tripIndex}] ✅ Driver connected to socket.`);
|
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
|
// 2. Passenger Requests Ride
|
||||||
try {
|
try {
|
||||||
const addRideFormData = new URLSearchParams({
|
const addRideFormData = new URLSearchParams({
|
||||||
|
|||||||
Reference in New Issue
Block a user