<?php
require __DIR__ . '/../src/config.php';
require __DIR__ . '/../public/mini_app/api/_vpn_helpers.php';

$pdo = db();
$limit = isset($argv[1]) ? max(1, min(100, (int)$argv[1])) : 50;
$result = vpnRetryPendingDeliveryNotifications($pdo, $limit);
echo json_encode(['ok'=>true,'result'=>$result], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . PHP_EOL;
