Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Prune expired email verifications #4408

Closed
chadwhitacre opened this issue Apr 13, 2017 · 3 comments
Closed

Prune expired email verifications #4408

chadwhitacre opened this issue Apr 13, 2017 · 3 comments

Comments

@chadwhitacre
Copy link
Contributor

chadwhitacre commented Apr 13, 2017

@dowski points out at #4335 (comment) that we might consider regularly pruning expired email verifications (and, by extension, package claims).

gratipay::MAROON=> select count(*) from emails where verification_end is null and verification_start < now() - '1 day'::interval;
┌───────┐
│ count │
├───────┤
│  1702 │
└───────┘
(1 row)

gratipay::MAROON=> select count(*) from emails where verification_end is null;
┌───────┐
│ count │
├───────┤
│  1703 │
└───────┘
(1 row)

gratipay::MAROON=> select count(*) from emails;
┌───────┐
│ count │
├───────┤
│  7911 │
└───────┘
(1 row)

gratipay::MAROON=>
@rohitpaulk
Copy link
Contributor

Interesting

@chadwhitacre
Copy link
Contributor Author

Maybe after 30 days so we have them around for a while for debugging if need be?

@rohitpaulk
Copy link
Contributor

One way to do this is to add a cron task that purges old verifications.

Resources that might help:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants