first commit
This commit is contained in:
10
backend/Admin/debug/scratch_test_redis.php
Normal file
10
backend/Admin/debug/scratch_test_redis.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../core/bootstrap.php';
|
||||
$redis = getRedis(); // or however it's connected in bootstrap
|
||||
if (!$redis) {
|
||||
echo "No redis\n"; exit;
|
||||
}
|
||||
$redis->geoadd('geo:rides:waiting', 36.0, 32.0, 'test_ride');
|
||||
$res = $redis->georadius('geo:rides:waiting', 36.0, 32.0, 10, 'km', ['WITHDIST' => true]);
|
||||
print_r($res);
|
||||
echo json_encode($res) . "\n";
|
||||
Reference in New Issue
Block a user