Fix driver visibility radius and silence tolerance in api_get_nearby
This commit is contained in:
@@ -37,7 +37,7 @@ if (!empty($INTERNAL_KEY) && $receivedKey !== $INTERNAL_KEY) {
|
||||
|
||||
$lat = $_REQUEST['lat'] ?? null;
|
||||
$lng = $_REQUEST['lng'] ?? null;
|
||||
$radius = $_REQUEST['radius'] ?? 5;
|
||||
$radius = $_REQUEST['radius'] ?? 25;
|
||||
$limit = $_REQUEST['limit'] ?? 100;
|
||||
|
||||
if (!$lat || !$lng) {
|
||||
@@ -67,7 +67,7 @@ try {
|
||||
|
||||
$validDrivers = [];
|
||||
$currentTime = time();
|
||||
$max_silence = 180;
|
||||
$max_silence = 900; // 15 دقيقة سماحية للسائق المنتظر في مكانه
|
||||
|
||||
foreach ($geoResults as $res) {
|
||||
// هيكل النتيجة مع WITHCOORD يختلف قليلاً
|
||||
@@ -76,9 +76,9 @@ try {
|
||||
$d_coord= $res[2]; // [0=>lng, 1=>lat] 🔥 الإحداثيات هنا
|
||||
|
||||
$profile = $redis->hgetall("driver:profile:$d_id");
|
||||
$lastUpdate = isset($profile['updated_at']) ? (int)$profile['updated_at'] : 0;
|
||||
$lastUpdate = isset($profile['updated_at']) ? (int)$profile['updated_at'] : $currentTime;
|
||||
|
||||
if (empty($profile) || ($currentTime - $lastUpdate) > $max_silence) {
|
||||
if (!empty($lastUpdate) && ($currentTime - $lastUpdate) > $max_silence) {
|
||||
$redis->zrem('geo:drivers:available', $d_id);
|
||||
$redis->zrem('geo:drivers:busy', $d_id);
|
||||
continue;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
platform :ios, '15.0'
|
||||
platform :ios, '16.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
@@ -41,7 +41,7 @@ post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
|
||||
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
|
||||
# config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
PODS:
|
||||
- audio_session (0.0.1):
|
||||
- Flutter
|
||||
- audioplayers_darwin (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- battery_plus (1.0.0):
|
||||
- Flutter
|
||||
- connectivity_plus (0.0.1):
|
||||
@@ -96,6 +99,16 @@ PODS:
|
||||
- GoogleDataTransport (10.1.0):
|
||||
- nanopb (~> 3.30910.0)
|
||||
- PromisesObjC (~> 2.4)
|
||||
- GoogleMLKit/BarcodeScanning (7.0.0):
|
||||
- GoogleMLKit/MLKitCore
|
||||
- MLKitBarcodeScanning (~> 6.0.0)
|
||||
- GoogleMLKit/MLKitCore (7.0.0):
|
||||
- MLKitCommon (~> 12.0.0)
|
||||
- GoogleToolboxForMac/Defines (4.2.1)
|
||||
- GoogleToolboxForMac/Logger (4.2.1):
|
||||
- GoogleToolboxForMac/Defines (= 4.2.1)
|
||||
- "GoogleToolboxForMac/NSData+zlib (4.2.1)":
|
||||
- GoogleToolboxForMac/Defines (= 4.2.1)
|
||||
- GoogleUtilities/AppDelegateSwizzler (8.1.0):
|
||||
- GoogleUtilities/Environment
|
||||
- GoogleUtilities/Logger
|
||||
@@ -159,6 +172,26 @@ PODS:
|
||||
- maplibre_gl (0.25.0):
|
||||
- Flutter
|
||||
- MapLibre (= 6.19.1)
|
||||
- MLImage (1.0.0-beta6)
|
||||
- MLKitBarcodeScanning (6.0.0):
|
||||
- MLKitCommon (~> 12.0)
|
||||
- MLKitVision (~> 8.0)
|
||||
- MLKitCommon (12.0.0):
|
||||
- GoogleDataTransport (~> 10.0)
|
||||
- GoogleToolboxForMac/Logger (< 5.0, >= 4.2.1)
|
||||
- "GoogleToolboxForMac/NSData+zlib (< 5.0, >= 4.2.1)"
|
||||
- GoogleUtilities/Logger (~> 8.0)
|
||||
- GoogleUtilities/UserDefaults (~> 8.0)
|
||||
- GTMSessionFetcher/Core (< 4.0, >= 3.3.2)
|
||||
- MLKitVision (8.0.0):
|
||||
- GoogleToolboxForMac/Logger (< 5.0, >= 4.2.1)
|
||||
- "GoogleToolboxForMac/NSData+zlib (< 5.0, >= 4.2.1)"
|
||||
- GTMSessionFetcher/Core (< 4.0, >= 3.3.2)
|
||||
- MLImage (= 1.0.0-beta6)
|
||||
- MLKitCommon (~> 12.0)
|
||||
- mobile_scanner (6.0.2):
|
||||
- Flutter
|
||||
- GoogleMLKit/BarcodeScanning (~> 7.0.0)
|
||||
- nanopb (3.30910.0):
|
||||
- nanopb/decode (= 3.30910.0)
|
||||
- nanopb/encode (= 3.30910.0)
|
||||
@@ -205,6 +238,7 @@ PODS:
|
||||
|
||||
DEPENDENCIES:
|
||||
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
||||
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/darwin`)
|
||||
- battery_plus (from `.symlinks/plugins/battery_plus/ios`)
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
|
||||
@@ -231,6 +265,7 @@ DEPENDENCIES:
|
||||
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
|
||||
- location (from `.symlinks/plugins/location/ios`)
|
||||
- maplibre_gl (from `.symlinks/plugins/maplibre_gl/ios`)
|
||||
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||
- quick_actions_ios (from `.symlinks/plugins/quick_actions_ios/ios`)
|
||||
@@ -256,12 +291,18 @@ SPEC REPOS:
|
||||
- FirebaseInstallations
|
||||
- FirebaseMessaging
|
||||
- GoogleDataTransport
|
||||
- GoogleMLKit
|
||||
- GoogleToolboxForMac
|
||||
- GoogleUtilities
|
||||
- GTMSessionFetcher
|
||||
- IOSSecuritySuite
|
||||
- libwebp
|
||||
- Mantle
|
||||
- MapLibre
|
||||
- MLImage
|
||||
- MLKitBarcodeScanning
|
||||
- MLKitCommon
|
||||
- MLKitVision
|
||||
- nanopb
|
||||
- OrderedSet
|
||||
- PromisesObjC
|
||||
@@ -274,6 +315,8 @@ SPEC REPOS:
|
||||
EXTERNAL SOURCES:
|
||||
audio_session:
|
||||
:path: ".symlinks/plugins/audio_session/ios"
|
||||
audioplayers_darwin:
|
||||
:path: ".symlinks/plugins/audioplayers_darwin/darwin"
|
||||
battery_plus:
|
||||
:path: ".symlinks/plugins/battery_plus/ios"
|
||||
connectivity_plus:
|
||||
@@ -326,6 +369,8 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/location/ios"
|
||||
maplibre_gl:
|
||||
:path: ".symlinks/plugins/maplibre_gl/ios"
|
||||
mobile_scanner:
|
||||
:path: ".symlinks/plugins/mobile_scanner/ios"
|
||||
package_info_plus:
|
||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||
permission_handler_apple:
|
||||
@@ -353,6 +398,7 @@ EXTERNAL SOURCES:
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
audio_session: 9bb7f6c970f21241b19f5a3658097ae459681ba0
|
||||
audioplayers_darwin: 835ced6edd4c9fc8ebb0a7cc9e294a91d99917d5
|
||||
battery_plus: b42253f6d2dde71712f8c36fef456d99121c5977
|
||||
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
|
||||
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
|
||||
@@ -381,6 +427,8 @@ SPEC CHECKSUMS:
|
||||
flutter_webrtc: ec91d94b484ad49cf191ef93413f64a40ffd3b4c
|
||||
geolocator_apple: ab36aa0e8b7d7a2d7639b3b4e48308394e8cef5e
|
||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||
GoogleMLKit: eff9e23ec1d90ea4157a1ee2e32a4f610c5b3318
|
||||
GoogleToolboxForMac: d1a2cbf009c453f4d6ded37c105e2f67a32206d8
|
||||
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
|
||||
image_cropper: fca51f94982730acae168c4b5d691e0f11aeb259
|
||||
@@ -395,6 +443,11 @@ SPEC CHECKSUMS:
|
||||
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
|
||||
MapLibre: 7f24faba45439f80ccb0f83393c29fa32cb81952
|
||||
maplibre_gl: a2114567cbd1065866614fbd34dfb75ab782aaa2
|
||||
MLImage: 0ad1c5f50edd027672d8b26b0fee78a8b4a0fc56
|
||||
MLKitBarcodeScanning: 0a3064da0a7f49ac24ceb3cb46a5bc67496facd2
|
||||
MLKitCommon: 07c2c33ae5640e5380beaaa6e4b9c249a205542d
|
||||
MLKitVision: 45e79d68845a2de77e2dd4d7f07947f0ed157b0e
|
||||
mobile_scanner: af8f71879eaba2bbcb4d86c6a462c3c0e7f23036
|
||||
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
||||
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
|
||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||
@@ -416,6 +469,6 @@ SPEC CHECKSUMS:
|
||||
WebRTC-SDK: ab9b5319e458c2bfebdc92b3600740da35d5630d
|
||||
webview_flutter_wkwebview: 8ebf4fded22593026f7dbff1fbff31ea98573c8d
|
||||
|
||||
PODFILE CHECKSUM: d5cc456343636170778b0bcb448cd4e9f40d8e6f
|
||||
PODFILE CHECKSUM: f5650806be6818baf4318187a920762a701a0351
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
DEVELOPMENT_TEAM = 63CVT8G5P8;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -701,7 +701,7 @@
|
||||
DEVELOPMENT_TEAM = 63CVT8G5P8;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@@ -726,7 +726,7 @@
|
||||
DEVELOPMENT_TEAM = 63CVT8G5P8;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
|
||||
@@ -1264,10 +1264,11 @@ packages:
|
||||
intaleq_maps:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "../../map-saas/packages/flutter-sdk"
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.2.0"
|
||||
name: intaleq_maps
|
||||
sha256: "4307196a9a9a4d4dfd29fd984ecd1f7460051523c74f9b201f0ba641dbda78a2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
internet_connection_checker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user