Hm… There might be a middle ground where the cron
Machine has read-only access to the database but then SSHes into the primary to perform occasional actual mutation operations (when they do need to fire). The following post from a year ago might give more of an idea of how that would go in terms of LiteFS configuration:
https://community.fly.io/t/litefs-with-more-than-one-processgroup/15829/2
(Caveat: you would also need to tweak lease.candidate
; the original poster’s &&
syntax doesn’t actually work, if I recall correctly.)
Overall, the consensus is that LiteFS is not scintillating when it comes to background workers, even though lightweight ones, for example, can be made to work eventually.
Hope this helps a little!
Aside: Some people are recommending Turso as a more centralized approach to SQLite on Fly.io; I haven’t looked into that much myself, though…