Skip to content

Commit

Permalink
feat(backend): Prune bulk email verification database (#1377)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
par4m and twitu authored Dec 4, 2023
1 parent fcaf292 commit f905735
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 69 deletions.
131 changes: 62 additions & 69 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"backend",
"cli",
Expand Down
11 changes: 11 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,14 @@ $ RUST_LOG=info ./target/release/reacher_backend
```

The server will then be listening on `http://127.0.0.1:8080`.

## Prune DB

- Start a PostgreSQL Server
- Start Reacher with Bulk Endpoints enabled.
- e.g `.env` :
RCH_ENABLE_BULK=1
DATABASE_URL="postgresql://user:temporary@localhost"
- Inside `.env` set `DAYS_OLD` e.g 1,2 etc
- Send a request to the Bulk End point and wait for the job id to be allotted.
- Build and Run `script` with `cargo run --bin prune_db`
Loading

0 comments on commit f905735

Please sign in to comment.