Allow IMAP sync intervals as low as 1 minute#325
Conversation
|
Changing it to 1 minute shouldn't cause any major issues. The background process scans the account every 10 seconds to determine whether a sync task should be triggered. Could you tell me about your use case? Why do you need it to be as frequent as 1 minute? |
|
Thanks! My main use case is near real-time archiving for small self-hosted installations. Many users only archive one or two IMAP accounts and would like newly received messages to appear in Bichon much sooner than after 10 minutes. Waiting up to 10 minutes feels unnecessarily long in those scenarios, while a 1-minute interval still seems like a reasonable compromise. Since the scheduler already wakes up every 10 seconds and the synchronization logic already supports arbitrary minute-based intervals, I thought lowering the validation limit from 10 to 1 minute would be a small, backwards-compatible improvement without changing the scheduling architecture. Of course, I understand that polling every minute is not appropriate for every deployment, which is why this PR only lowers the minimum configurable value rather than changing the default. |
Summary
This PR lowers the minimum allowed incremental IMAP synchronization interval from 10 minutes to 1 minute.
The scheduler already supports arbitrary minute-based intervals, but both the frontend and backend validation enforced a minimum of 10 minutes. This change only updates the validation and corresponding user-facing messages.
Changes
Compatibility
This change is fully backwards compatible.
Existing configurations continue to work unchanged.
Testing
cargo build --release)pnpm build)