mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-22 18:48:14 -05:00
Log: 给流量消费队列当中保存失败的用户增加错误日志
This commit is contained in:
parent
1fcb6fa911
commit
c25803aa74
@ -66,13 +66,16 @@ class TrafficFetchJob implements ShouldQueue
|
|||||||
$newTime = time();
|
$newTime = time();
|
||||||
$newU = $user->u + ($v[0] * $targetServer['rate']);
|
$newU = $user->u + ($v[0] * $targetServer['rate']);
|
||||||
$newD = $user->d + ($v[1] * $targetServer['rate']);
|
$newD = $user->d + ($v[1] * $targetServer['rate']);
|
||||||
\DB::table('v2_user')
|
$rows = \DB::table('v2_user')
|
||||||
->where('id', $uid)
|
->where('id', $uid)
|
||||||
->update([
|
->update([
|
||||||
't' => $newTime,
|
't' => $newTime,
|
||||||
'u' => $newU,
|
'u' => $newU,
|
||||||
'd' => $newD,
|
'd' => $newD,
|
||||||
]);
|
]);
|
||||||
|
if($rows === 0){
|
||||||
|
\Log::error("流量更新失败\n未记录用户ID:{$uid}\n未记录上行:{$user->u}\n未记录下行:{$user->d}");
|
||||||
|
}
|
||||||
}, 3);
|
}, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user