#5538 (The unique id of action dialog callback steps are bytestrings)
by Luc Saffre · in Developers · assigned to Sharif Mehedi
Résumé
Concepts sous-jacents
Commentaires
- 1 année, 8 mois ago by Luc Saffre about #5538 (The unique id of action dialog callback steps are bytestrings) : Once upon a time add_callback() and set_callback() were methods of the CallbackManager class, which is still in the code as unused_CallbackManager. The problem with this CallbackManager was that it uses a global dict to store the callback id's, which failed when a site was running with multiple proc...
- 1 année, 8 mois ago by Sharif Mehedi about #5538 (The unique id of action dialog callback steps are bytestrings) (1 reply) : another way to optimize this would be to have the usernames concatenated with message string and then take md5 hash.
- 1 année, 8 mois ago by Sharif Mehedi about #5538 (The unique id of action dialog callback steps are bytestrings) : callback ids are volatile. they don't persist over requests. uuid wouldn't make much sense here, unless we make the ids persistent.
- 2 ans, 6 mois ago by Luc Saffre about #5538 (The unique id of action dialog callback steps are bytestrings) : I leave this to you @8lurry .
- 2 ans, 6 mois ago by Luc Saffre about #5538 (The unique id of action dialog callback steps are bytestrings) : I wonder what happens if two users start a same action and both get a cup of coffee at the same question. Will Lino potentially mix up their answers? If yes, shouldn't we rather use uuid to generate a unique id?
- 2 ans, 6 mois ago by Luc Saffre about #5538 (The unique id of action dialog callback steps are bytestrings) : haslib.md5().digest() returned bytestrings, yielding strings of style "b'8\x04\xeb\xf53\x9f\xf2\x90\x82l\x81~s\xe8\x90\xa6'" in the AJAX communication. I now use hexdigst(), which returns more readable strings.
- 2 ans, 6 mois ago by Luc Saffre about #5538 (The unique id of action dialog callback steps are bytestrings) : Created new Ticket #5538 (The id of action dialog callback steps are bytestrings).