Update: 2026-07-22 00:48:30

This commit is contained in:
Hamza-Ayed
2026-07-22 00:48:30 +03:00
parent b613022169
commit 521d76c4cf
3 changed files with 24 additions and 11 deletions
@@ -21,8 +21,13 @@ $redisResultsMap = [];
// 1. محاولة البحث عبر Redis
try {
$locationServerUrl = getenv('LOCATION_SOCKET_URL');
$INTERNAL_KEY = trim(file_get_contents(getenv('INTERNAL_SOCKET_KEY_PATH')));
$locationServerUrl = getenv('LOCATION_SOCKET_URL') ?: 'http://socket_driver:2021';
if (strpos($locationServerUrl, 'localhost') !== false || strpos($locationServerUrl, '127.0.0.1') !== false) {
if (file_exists('/.dockerenv')) {
$locationServerUrl = str_replace(['localhost', '127.0.0.1'], 'socket_driver', $locationServerUrl);
}
}
$INTERNAL_KEY = function_exists('getInternalSocketKey') ? getInternalSocketKey() : '';
$postData = [
'action' => 'get_nearby_ride_ids',