From b86f95c90d6e84710b8201ad2de34b20bc95754e Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Wed, 22 Jul 2026 23:27:18 +0300 Subject: [PATCH] Update: 2026-07-22 23:27:18 --- backend/ride/location/get.php | 2 +- loction_server/api_get_nearby.php | 1 + .../home/map/nearby_drivers_controller.dart | 16 ---------------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/backend/ride/location/get.php b/backend/ride/location/get.php index a9ae72ba..b5288d5a 100644 --- a/backend/ride/location/get.php +++ b/backend/ride/location/get.php @@ -34,7 +34,7 @@ try { // ========================================== $locationServerUrl = getenv('LOCATION_API_URL') ?: 'https://jordan-siro.intaleqapp.com/loction_server/api_get_nearby.php'; $keyPath = getenv('INTERNAL_SOCKET_KEY_PATH') ?: '/keys/.internal_socket_key'; - $INTERNAL_KEY = getenv('INTERNAL_SOCKET_KEY') ?: (file_exists($keyPath) ? trim((string)@file_get_contents($keyPath)) : (file_exists('/home/location/.internal_socket_key') ? trim((string)@file_get_contents('/home/location/.internal_socket_key')) : '')); + $INTERNAL_KEY = getenv('INTERNAL_SOCKET_KEY') ?: (file_exists($keyPath) ? trim((string)@file_get_contents($keyPath)) : (file_exists(__DIR__ . '/../../../loction-keys/.internal_socket_key') ? trim((string)@file_get_contents(__DIR__ . '/../../../loction-keys/.internal_socket_key')) : (file_exists('/home/location/.internal_socket_key') ? trim((string)@file_get_contents('/home/location/.internal_socket_key')) : ''))); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $locationServerUrl); diff --git a/loction_server/api_get_nearby.php b/loction_server/api_get_nearby.php index 08cd96ab..d92458e0 100755 --- a/loction_server/api_get_nearby.php +++ b/loction_server/api_get_nearby.php @@ -10,6 +10,7 @@ function getInternalKey(): string { if ($envKey) return trim($envKey); $path = getenv('INTERNAL_SOCKET_KEY_PATH'); if ($path && file_exists($path)) return trim((string)@file_get_contents($path)); + if (file_exists(__DIR__ . '/../loction-keys/.internal_socket_key')) return trim((string)@file_get_contents(__DIR__ . '/../loction-keys/.internal_socket_key')); if (file_exists('/keys/.internal_socket_key')) return trim((string)@file_get_contents('/keys/.internal_socket_key')); if (file_exists('/home/location/.internal_socket_key')) return trim((string)@file_get_contents('/home/location/.internal_socket_key')); return ''; diff --git a/siro_rider/lib/controller/home/map/nearby_drivers_controller.dart b/siro_rider/lib/controller/home/map/nearby_drivers_controller.dart index f75628f0..3f9d9edb 100644 --- a/siro_rider/lib/controller/home/map/nearby_drivers_controller.dart +++ b/siro_rider/lib/controller/home/map/nearby_drivers_controller.dart @@ -29,21 +29,6 @@ class NearbyDriversController extends GetxController { final double minMovementThreshold = 2.0; final Map _animationTimers = {}; final List> fakeCarData = []; - Timer? _autoRefreshTimer; - - @override - void onInit() { - super.onInit(); - detectPerfMode(); - _startPeriodicRefresh(); - } - - void _startPeriodicRefresh() { - _autoRefreshTimer?.cancel(); - _autoRefreshTimer = Timer.periodic(const Duration(seconds: 5), (_) { - getCarsLocationByPassengerAndReloadMarker(); - }); - } Future getCarsLocationByPassengerAndReloadMarker() async { carsLocationByPassenger = []; @@ -481,7 +466,6 @@ class NearbyDriversController extends GetxController { @override void onClose() { - _autoRefreshTimer?.cancel(); _animationTimers.forEach((key, timer) => timer.cancel()); _animationTimers.clear(); super.onClose();