Add Stripe subscription sync

This commit is contained in:
Jon Staab
2026-04-01 16:26:54 -07:00
parent 7e0bd14ef3
commit 05e4eac025
9 changed files with 39 additions and 69 deletions
+1 -7
View File
@@ -14,14 +14,8 @@ Members:
## `pub async fn start(self)`
- Subscribes to `command.notify` before doing anything else so no activities are missed.
- Calls `catch_up` to sync any relays that need it from before this process started.
- Subscribes to `command.notify`
- Loops on `rx.recv()`, calling `handle_activity` for each received `Activity`.
- On `Lagged`, logs a warning and runs `catch_up` to recover.
## `async fn catch_up(&self)`
- Lists all relays via `query.list_relays()` and syncs any where `synced == 0` and `sync_error` is empty.
## `async fn handle_activity(&self, activity: &Activity)`