mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-09 17:55:57 +00:00
Make the max queue size and give up time configurable
Today, the maximum number of items in the queue, as well as how long we keep attempting to send each item, is hard-coded and not changed by end users. While they are totally adequate for chasquid's main use cases, it can still be useful for some users to change them. So this patch adds two new configuration options for those settings. They're marked experimental for now, so we can adjust them if needed after they get more exposure. Thanks to Lewis Ross-Jones <lewis_r_j@hotmail.com> for suggesting this improvement, and help with testing it.
This commit is contained in:
@@ -101,4 +101,18 @@ message Config {
|
||||
// This allows deploying chasquid behind a HAProxy server, as the
|
||||
// address information is preserved.
|
||||
bool haproxy_incoming = 16;
|
||||
|
||||
// Maximum number of items in the queue.
|
||||
// If we have this many items in the queue, we reject new incoming
|
||||
// email. Be careful when increasing this, as we keep all items in
|
||||
// memory.
|
||||
// Default: 200 (but may change in the future).
|
||||
uint32 max_queue_items = 17;
|
||||
|
||||
// How long do we keep retrying sending an email before we give up.
|
||||
// Once we give up, a DSN will be sent back to the sender.
|
||||
// The format is a Go duration string (e.g. "48h" or "360m"; note days
|
||||
// are not a supported unit).
|
||||
// Default: "20h" (but may change in the future).
|
||||
string give_up_send_after = 18;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user