Closed
Bug 1497693
Opened 7 years ago
Closed 7 years ago
Firefox Monitor: add job to delete unverified subscribers to stage, then prod
Categories
(Cloud Services :: Operations: Miscellaneous, task)
Cloud Services
Operations: Miscellaneous
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: groovecoder, Assigned: oremj)
References
Details
To delete expired unverified subscribers, we have a script:
node scripts/delete-unverified-subscribers.js
On Heroku, we run this every 10 minutes via Heroku Scheduler.
We should add a corresponding cron(?) job to the stage environment, and when we verify it's working correctly, add the same job to production.
Note: Make sure DELETE_UNVERIFIED_SUBSCRIBERS_TIMER env var is set to 86400 (24 hours).
| Reporter | ||
Comment 1•7 years ago
|
||
ping: any ETA for this?
| Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(bobm)
Comment 2•7 years ago
|
||
I would like to avoid creating an administration node for this single job. Does it have a locking feature where it'll refuse to run if another instance is already running? Is it very resource intensive?
Flags: needinfo?(bobm) → needinfo?(lcrouch)
| Reporter | ||
Comment 3•7 years ago
|
||
No locking feature in the script. But the DB will lock the table, so each script run would wait until the previous one finishes for that. The script should also be idempotent, so running it many times shouldn't hurt anything.
I'm afraid it may be resource-intensive, unless/until we add another DB index on the created_at field, since the delete statement has a WHERE created_at < expiredTimeStamp. Should add that index before we turn this on.
Flags: needinfo?(lcrouch)
Comment 4•7 years ago
|
||
(In reply to Luke Crouch [:groovecoder] from comment #3)
> I'm afraid it may be resource-intensive, unless/until we add another DB
> index on the created_at field, since the delete statement has a WHERE
> created_at < expiredTimeStamp. Should add that index before we turn this on.
Do you want to handle that through a knex db migration, or add it manually?
Flags: needinfo?(lcrouch)
| Reporter | ||
Comment 5•7 years ago
|
||
knex db migration for sure.
I'm planning to file a deploy bug on Monday for next week. It will include lots of changes already:
* l10n (using an env var to keep it en-US only until we're ready to launch the other locales)
* sentry functionality
* potentially a bug fix on the HIBP callback endpoint
So it will already need some hands-on deployment help. An extra db migration should be relatively minor part of it.
Flags: needinfo?(lcrouch)
| Reporter | ||
Updated•7 years ago
|
Assignee: nobody → lcrouch
| Reporter | ||
Comment 6•7 years ago
|
||
ni? :jbuck here too - could we tackle this cron job while we're setting up the one for remote settings?
Flags: needinfo?(jbuckley)
Comment 7•7 years ago
•
|
||
This has been deployed in stage, PR is up at https://github.com/mozilla-services/cloudops-infra/pull/855
Flags: needinfo?(jbuckley)
| Assignee | ||
Updated•7 years ago
|
Assignee: lcrouch → oremj
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•