Tuesday, October 17, 2017

Django and Background Tasks

Hi,

I want to use a Data Collector Process to receive data from a separate Source (Sensor Data, etc)  and deliver new values via websocket to a client (Website). 
Steps to do:
1. User opens website :  page 01,
2. Django receives a web socket message: page01 from the user (routing, consumers.py)
3. Django starts the Data Collector Process with transfer parameter "page01"
4. The Data Collector Process calls permanent  the required values from the source  and when new values available send it vie websocket to the specific user. (Update new values)
4. When the user leaves the website, django has to exit the Data Collector Process.


So the website has more sites. Each of them consists a view for different data sources from the Data Collector Process.
I read many about Celery and Background Process. But the information is to less for, me to Solve my Problems. In Celery I am not able to start a separate process from django and finish after a user leaves the website.  Or can somebody makes a good example for me?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/18717cfa-69a5-43aa-a64f-b82ed63179b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment