Closed erpreciso closed 10 years ago
using the thread module it's possible to assign a timer after the channel disconnection message arrived, and logout the teacher in case of no action on his side
use the Timer class of the threading module https://docs.python.org/2/library/threading.html#timer-objects
it looks complicated to implement the timer; better the cron service https://developers.google.com/appengine/docs/python/config/cron
implemented the cron job that automatically clean all objects every hour
after the teacher is disconnected for a while, automatically end lesson and logout teacher