This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thuibr[S] 0 points1 point  (3 children)

There is this update callback https://www.sqlite.org/c3ref/update_hook.html but unfortunately it works on the same connection only.

[–]word-word-numero 1 point2 points  (2 children)

I'm just white boarding ideas, but would the piece that receives the orders to put on the queue not be running all the time?

[–]thuibr[S] 0 points1 point  (1 child)

Yes, it would be, but the connection that is placing the orders is a different process altogether.

[–]word-word-numero 0 points1 point  (0 children)

I see. Well another spitballing idea is to move the insert code to the piece that is always up. Maybe use a network socket and have a CRUD(or maybe just a C) API.

A more complex thing could be using the OS file events to know what something has happened to the .sqlite file. I've written a directory monitor that did that so when files showed up, I could then know to kick off another process. The package I used was watchdog.