-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prune bulk email verification database #1377
Conversation
Prune bulk email verification database
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall! Only small nits
Would you be interested in automated tests ? Running the script as a service instead of a one-time cleanup |
You mean a rust
I am also thinking about this. Currently the way I see the end user using it is to create a binary (via cargo build), and put it in a crontab. Or maybe a docker container. What do you mean by "run as a service"? |
Can you also fix the failing tests here? |
Not sure if the failing CI action is due to code change or a simple fluke. Could you resolve conflicts and let's retry? |
Seems like a fluke, I've barely changed anything and as far as I know the tests had passed on the first commit ? I'll check the logs and try to fix it |
I've resolved the conflicts, let's see if the tests pass now. |
Seems like an openssl-sys issue sfackler/rust-openssl#1021 (comment) |
Do you have any ideas how to fix it in the Github action file? What worries me is that this same action passes on Github, and on other PRs like #1370, so it is related to this PR? |
Seems like a very prominent issue https://github.com/sfackler/rust-openssl/issues?q=is%3Aissue++action+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@par4m Consider merging he pruning logic into the backend
crate. This has a couple of advantages -
- One less crate and dependencies list to maintain. Most of the dependencies are the same as the ones used for bulk logic in backend. This will potentially solve the ssl issue as well since backend already has an ssl dependency that passes.
- This will also make pruning flexible
- It can be feature flagged and launched as part of the main script in backend using
tokio::spawn
. - It can also be exposed as a cli command by creating a
src/bin/prune_db.rs
in backend. This will allow users to do one off pruning or build the executable and run it as a cron job.
- It can be feature flagged and launched as part of the main script in backend using
Weird that the Action is still failing. I'll merge this PR, I'll figure out later. Two things before I merge (same comments as #1377 (review), seems like they were reverted):
|
Thanks! Merging, let's hope the failing check was just a fluke on this PR. |
* Add cleanup script: Delete completed jobs * Add Env var. Switch to SQL only * Add Transactions. println -> info! * Fix workspace member and reformat * Add debug mode * Minor fixes * rename to dry_mode * Delete script/Cargo.lock * Add script/README * Fix * update Cargo.lock * update script/Cargo.toml * update dependency * update dependency * move script -> backend * update backend/README --------- Co-authored-by: Ishan Bhanuka <bhanuka.ishan@gmail.com>
#1144