1.ws优化订阅,修复中大奖没有推送

This commit is contained in:
2026-05-27 10:40:55 +08:00
parent 8f5ba977a4
commit a96aa0fb41
3 changed files with 241 additions and 13 deletions

View File

@@ -114,27 +114,43 @@ foreach ($records as $gr) {
continue;
}
echo " -- bet.win dedup keys --\n";
foreach (array_keys($winUserIds) as $uid) {
$key = 'dfw:v1:ws:betwin:' . $pid . ':' . $uid;
echo " -- draw / bet.win dedup keys --\n";
foreach (['dfw:v1:ws:period_opened:' . $pid => 'period.opened', 'dfw:v1:ws:period_payout:' . $pid => 'period.payout'] as $key => $label) {
try {
$val = Redis::get($key);
$ttl = Redis::ttl($key);
} catch (\Throwable $e) {
} catch (\Throwable) {
$val = false;
$ttl = -2;
}
$exists = ($val !== false && $val !== null && $val !== '');
echo sprintf(
" %s user=%d exists=%s ttl=%s %s\n",
$key,
" %s exists=%s ttl=%s %s\n",
$label,
$exists ? 'YES' : 'NO',
(string) $ttl,
$exists ? '(已推送)' : '(未推送)'
);
}
foreach (array_keys($winUserIds) as $uid) {
$key = 'dfw:v1:ws:betwin:' . $pid . ':' . $uid;
try {
$val = Redis::get($key);
$ttl = Redis::ttl($key);
} catch (\Throwable) {
$val = false;
$ttl = -2;
}
$exists = ($val !== false && $val !== null && $val !== '');
echo sprintf(
" bet.win user=%d exists=%s ttl=%s %s\n",
$uid,
$exists ? 'YES' : 'NO',
(string) $ttl,
$exists ? '(已推送)' : '(未推送 → 重启 webman 后用 republish_bet_win.php 补发)'
$exists ? '(已推送)' : '(未推送)'
);
}
echo "\n";
}
echo "如需补发php scripts/republish_bet_win.php --period-no=<no> --force\n";
echo "补发php scripts/republish_period_draw.php --period-no=<no> --force\n";