Update PurgeClaims timer to purge after 2 minutes

This commit is contained in:
Ethan Lane 2025-04-04 19:03:21 +01:00
parent aafcfd664a
commit 2ab3ea1105

View file

@ -4,7 +4,7 @@ import Claim from "../database/entities/app/Claim";
export default async function PurgeClaims() { export default async function PurgeClaims() {
const claims = await Claim.FetchAll(Claim); const claims = await Claim.FetchAll(Claim);
const whenLastClaimable = new Date(Date.now() - (1000 * 60 * 5)); // 5 minutes ago const whenLastClaimable = new Date(Date.now() - (1000 * 60 * 2)); // 2 minutes ago
const expiredClaims = claims.filter(x => x.WhenCreated < whenLastClaimable); const expiredClaims = claims.filter(x => x.WhenCreated < whenLastClaimable);