I have a website that allows for a subscription query to be passed which starts a feed of data. I need to capture that data and store it in a database. I have the websocket code that runs fine on its own but when I try to run it inside the django app nothing happens. Open to any ideas suggestions.
Do not try to handle this from within your Django process. Create an external process to do this.
I am finding that out. How would you then handle the ability to turn the feed off through user input?
That depends upon how you set it up and what IPC mechanism you use to communicate between the two. (In other words, a detailed answer can only be provided in the context of the basic architecture of your solution - but in general, it’s going to involve some form of message passing between the processes.)