Pregunta

I'm using django and sqlite3 for my website and my client wants me to be able to push to him changes in my room availability for the local small accommodation service I provide. I found that I can do this with pusher but that's as far as I've managed to get with answers for getting this done.

I know with asp.net I can set change tracking on my availability table and create a windows service to run every 18 minutes to poll my database for changes and then send those changes to my client. Is something like this possible with pusher or django itself. Is it possible to do this on change event of value of number of rooms available in my availability table. Any advice or direction would be greatly appreciated.

¿Fue útil?

Solución

You need to use a task queue library like Celery. You can also setup Celery as a Windows service. For your application, you will need to store the last room availability status in the database. This way you need to notify the client only if the current availability status is different from the stored status.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top