Update: 2026-07-22 00:48:30
This commit is contained in:
@@ -20,13 +20,13 @@ $destLng = filterRequest('destination_lng') ?? filterRequest('target_longitude'
|
||||
$destName = filterRequest('destination_name') ?? 'Destination';
|
||||
|
||||
function notifySocketServerDestination($userId, $hasDestination, $destLat = '', $destLng = '', $destName = '') {
|
||||
$url = getenv('LOCATION_SOCKET_URL');
|
||||
$internalKey = function_exists('getInternalSocketKey') ? getInternalSocketKey() : '';
|
||||
|
||||
if (empty($url)) {
|
||||
error_log("[save_driver_destination] LOCATION_SOCKET_URL env variable not set");
|
||||
return;
|
||||
$url = getenv('LOCATION_SOCKET_URL') ?: 'http://socket_driver:2021';
|
||||
if (strpos($url, 'localhost') !== false || strpos($url, '127.0.0.1') !== false) {
|
||||
if (file_exists('/.dockerenv')) {
|
||||
$url = str_replace(['localhost', '127.0.0.1'], 'socket_driver', $url);
|
||||
}
|
||||
}
|
||||
$internalKey = function_exists('getInternalSocketKey') ? getInternalSocketKey() : '';
|
||||
|
||||
$postData = [
|
||||
'action' => 'update_driver_destination',
|
||||
|
||||
Reference in New Issue
Block a user