Update: 2026-07-22 23:27:18

This commit is contained in:
Hamza-Ayed
2026-07-22 23:27:18 +03:00
parent b83ca1f664
commit b86f95c90d
3 changed files with 2 additions and 17 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ try {
// ========================================== // ==========================================
$locationServerUrl = getenv('LOCATION_API_URL') ?: 'https://jordan-siro.intaleqapp.com/loction_server/api_get_nearby.php'; $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'; $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(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $locationServerUrl); curl_setopt($ch, CURLOPT_URL, $locationServerUrl);
+1
View File
@@ -10,6 +10,7 @@ function getInternalKey(): string {
if ($envKey) return trim($envKey); if ($envKey) return trim($envKey);
$path = getenv('INTERNAL_SOCKET_KEY_PATH'); $path = getenv('INTERNAL_SOCKET_KEY_PATH');
if ($path && file_exists($path)) return trim((string)@file_get_contents($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('/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')); if (file_exists('/home/location/.internal_socket_key')) return trim((string)@file_get_contents('/home/location/.internal_socket_key'));
return ''; return '';
@@ -29,21 +29,6 @@ class NearbyDriversController extends GetxController {
final double minMovementThreshold = 2.0; final double minMovementThreshold = 2.0;
final Map<String, Timer> _animationTimers = {}; final Map<String, Timer> _animationTimers = {};
final List<Map<String, dynamic>> fakeCarData = []; final List<Map<String, dynamic>> fakeCarData = [];
Timer? _autoRefreshTimer;
@override
void onInit() {
super.onInit();
detectPerfMode();
_startPeriodicRefresh();
}
void _startPeriodicRefresh() {
_autoRefreshTimer?.cancel();
_autoRefreshTimer = Timer.periodic(const Duration(seconds: 5), (_) {
getCarsLocationByPassengerAndReloadMarker();
});
}
Future<bool> getCarsLocationByPassengerAndReloadMarker() async { Future<bool> getCarsLocationByPassengerAndReloadMarker() async {
carsLocationByPassenger = []; carsLocationByPassenger = [];
@@ -481,7 +466,6 @@ class NearbyDriversController extends GetxController {
@override @override
void onClose() { void onClose() {
_autoRefreshTimer?.cancel();
_animationTimers.forEach((key, timer) => timer.cancel()); _animationTimers.forEach((key, timer) => timer.cancel());
_animationTimers.clear(); _animationTimers.clear();
super.onClose(); super.onClose();