Commit 2432e92
feat(preview-enhancement): make background-job interval configurable
The PreviewEnhancementProcessingJob is what writes the `imip_message`
flag onto mail_messages rows. Downstream, IMipMessageJob only picks
up messages with that flag set, so the enhancement interval is the
ceiling on how long an incoming calendar invitation can take to turn
into a CalDAV event.
The current hard-coded 3600s is reasonable for bulk-preview enrichment
but way too slow for the iMIP pipeline: small Proton/Fastmail/self-
hosted installs that want invitations to feel live need something in
the 60–300s range. That's a per-setup trade-off (smaller sites have
the headroom, larger ones probably do not), so let's expose the knob
instead of picking one number.
New system config:
occ config:system:set app.mail.preview-enhancement-interval \
--value=300 --type=integer
When unset, keeps the existing 3600s default. A MIN_INTERVAL=60s
floor prevents a misconfigured value from hammering the DB. The job
instance is re-created every time the scheduler enqueues it, so the
new value takes effect on the next tick — no restart needed.
AI-assisted: Claude Code (Claude Opus 4.7)
Signed-off-by: Wolfgang Lubowski <w.lub92@gmail.com>1 parent de964d8 commit 2432e92
1 file changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
33 | | - | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
42 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
43 | 58 | | |
44 | 59 | | |
45 | 60 | | |
| |||
0 commit comments