diff options
| author | Mroik <mroik@delayed.space> | 2026-04-10 00:21:25 +0200 |
|---|---|---|
| committer | Mroik <mroik@delayed.space> | 2026-04-13 06:56:11 +0200 |
| commit | b336fd39444e8089d35a7a2bd4c0c3e8228c6c36 (patch) | |
| tree | 945f577f4c8b1d8c9e58b10d39e38832ec77391c /src/model.rs | |
| parent | 0ff548961a68213487faa85b7b01cf717bb27268 (diff) | |
Add mail processing scaffolding
After receiving the email we don't want to process it in the same thread
as soon as we can, instead we queue it to a MailProcessor. This allows
us to be more flexible with the pipeline and reduce the amount of
concurrency for the database connection. This also helps with writing
possible fences around resource consumption.
Signed-off-by: Mroik <mroik@delayed.space>
Diffstat (limited to 'src/model.rs')
| -rw-r--r-- | src/model.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/model.rs b/src/model.rs index 7fcf80f..37a855f 100644 --- a/src/model.rs +++ b/src/model.rs @@ -346,6 +346,13 @@ impl SubscriptionQuery<'_> { } } +// TODO +pub struct Mail { + pub from: String, + pub recipient: Vec<String>, + pub data: String, +} + #[cfg(test)] mod tests { use anyhow::Result; |
