winfried / HelpIM

*obsoleted* An chat-system for online psycho-social counselling
11 stars 3 forks source link

Questionaires don't seem to always be linked to a chat #254

Closed winfried closed 11 years ago

winfried commented 11 years ago

Some sites experience that only a part of the entered questionnaires are visible on the page with the chatlog. Also when downloading all data as CSV these questionnaires are not visible. But when looking at the questionnaire objects, there are questionnaires visible.

winfried commented 11 years ago

Part of this issue can be caused by the time out / cleanup of the rooms, after closing the chat. A sample log of this is:

2013-09-15 18:54:37,972 [INFO] helpim.rooms.bot: A user left room 'helpim_7bddb29d45c8c59bc9dda3ce36c9eef94a16400cd1f49ee72f2a8eb0ebaba8db.0@muc.localhost/HelpIM' (clean exit).
2013-09-15 18:54:37,991 [INFO] helpim.rooms.bot: User was: Nick = 'lief'.
2013-09-15 18:54:40,052 [INFO] helpim.rooms.bot: A user left room 'helpim_7bddb29d45c8c59bc9dda3ce36c9eef94a16400cd1f49ee72f2a8eb0ebaba8db.0@muc.localhost/HelpIM' while the other user already left clean before (clean exit).
2013-09-15 18:54:40,056 [INFO] helpim.rooms.bot: User was: Nick = 'asdf'.
2013-09-15 19:02:18,224 [INFO] helpim.rooms.bot: Closing room helpim_096d7e5f088099969392a2f4b8f2ad39fc2a6562d369e80c94532d061480187f.0@muc.localhost which was not used anymore.
2013-09-15 19:02:18,224 [INFO] helpim.rooms.bot: Closing down MUC-room 'helpim_096d7e5f088099969392a2f4b8f2ad39fc2a6562d369e80c94532d061480187f.0@muc.localhost'.
2013-09-15 19:02:18,225 [INFO] helpim.rooms.bot: Kicking user with nick 'cs'.
2013-09-15 19:02:18,225 [INFO] helpim.rooms.bot: Kicking user with nick 'lief'.
2013-09-15 19:02:18,226 [INFO] helpim.rooms.bot: Leaving MUC-room 'helpim_096d7e5f088099969392a2f4b8f2ad39fc2a6562d369e80c94532d061480187f.0@muc.localhost'.
2013-09-15 19:02:18,230 [INFO] helpim.rooms.bot: Closing room helpim_7bddb29d45c8c59bc9dda3ce36c9eef94a16400cd1f49ee72f2a8eb0ebaba8db.0@muc.localhost which was not used anymore.
2013-09-15 19:02:18,231 [INFO] helpim.rooms.bot: Closing down MUC-room 'helpim_7bddb29d45c8c59bc9dda3ce36c9eef94a16400cd1f49ee72f2a8eb0ebaba8db.0@muc.localhost'.
2013-09-15 19:02:18,231 [INFO] helpim.rooms.bot: Kicking user with nick 'lief'.
2013-09-15 19:02:18,231 [INFO] helpim.rooms.bot: Kicking user with nick 'asdf'.
2013-09-15 19:02:18,232 [INFO] helpim.rooms.bot: Leaving MUC-room 'helpim_7bddb29d45c8c59bc9dda3ce36c9eef94a16400cd1f49ee72f2a8eb0ebaba8db.0@muc.localhost'.

The first chat (with cs) was correct, the forms were send in before cleaning up the room. On the second chat (with asdf) the forms were submitted after closing the chatroom. These forms were not correctly linked to the chat. NOTE: both chatrooms were closed at the same moment, so maybe the scheduling of the events was incorrect.

Beside this issue, there is also an other, still not reproduced, path where this might happen. This path results in some errors in the logs:

2013-09-12 17:33:52,828 [INFO] helpim.rooms.bot: A user left room 'helpim_c31ba89854e8b41f7b5b3942acc5c04313728e0fc19f92dabb4660fb46cce5d6.0@muc.localhost/Hel
pIM' (clean exit).
2013-09-12 17:33:52,833 [INFO] helpim.rooms.bot: User was: Nick = '**CS**'.
2013-09-12 17:33:55,766 [INFO] helpim.rooms.bot: A user left room 'helpim_c31ba89854e8b41f7b5b3942acc5c04313728e0fc19f92dabb4660fb46cce5d6.0@muc.localhost/Hel
pIM' while the other user already left clean before (clean exit).
2013-09-12 17:33:55,770 [INFO] helpim.rooms.bot: User was: Nick = '**CW**'.
2013-09-12 17:34:15,267 [INFO] helpim.rooms.bot: Closing room helpim_c31ba89854e8b41f7b5b3942acc5c04313728e0fc19f92dabb4660fb46cce5d6.0@muc.localhost which wa
s not used anymore.
2013-09-12 17:34:15,268 [INFO] helpim.rooms.bot: Closing down MUC-room 'helpim_c31ba89854e8b41f7b5b3942acc5c04313728e0fc19f92dabb4660fb46cce5d6.0@muc.localhos
t'.
2013-09-12 17:34:15,268 [INFO] helpim.rooms.bot: Kicking user with nick '**CS**.'.
2013-09-12 17:34:15,268 [INFO] helpim.rooms.bot: Kicking user with nick '**CW**'.
2013-09-12 17:34:15,268 [INFO] helpim.rooms.bot: Leaving MUC-room 'helpim_c31ba89854e8b41f7b5b3942acc5c04313728e0fc19f92dabb4660fb46cce5d6.0@muc.localhost'.
2013-09-12 17:34:40,926 [ERROR] helpim.rooms.bot: Could not find room 'helpim_c31ba89854e8b41f7b5b3942acc5c04313728e0fc19f92dabb4660fb46cce5d6.0@muc.localhost
' in database.
2013-09-12 17:34:40,926 [WARNING] helpim.rooms.bot: get_helpim_room couldn't find a room
(....)
2013-09-12 17:35:31,314 [ERROR] helpim.rooms.bot: Could not find room 'helpim_c31ba89854e8b41f7b5b3942acc5c04313728e0fc19f92dabb4660fb46cce5d6.0@muc.localhost' in database.
2013-09-12 17:35:31,314 [WARNING] helpim.rooms.bot: get_helpim_room couldn't find a room

It seems this is usually preceded by an event where the CS is kicked from the lobby and no waiting room for the lobby is found, but this relation is speculative.

winfried commented 11 years ago

The Error/Warning is caused by by a room that got 'toDestroy' and was closed before the forms were submitted. The event of the CS being kicked from the lobby is unrelated and will be dealt with in another bug.