Hi everyone. My situation is I have my app running on 2 machines which are in the same region, using LiteFS as storage, and a self-hosted Redis machine. In my app there’s a worker using Bull to create notifications. My problem is that when my Worker select a machine to process a job, it will occasionally choose the replica machine which then produce the error:
<time> app[id] hkg [info] Process job 1763
<time> app[id] hkg [info] level=INFO msg="fuse: create(): cannot create journal: read only replica"
<time> app[id] hkg [info] job add notification 1763 failed with error: Error: {"name":"PrismaClientUnknownRequestError","clientVersion":"5.6.0"}
How can I prevent this error? Is there a way to ensure that Bull always assigns jobs to the primary machine for processing?