Update PurgeClaims timer to purge after 2 minutes
This commit is contained in:
parent
aafcfd664a
commit
2ab3ea1105
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue