sometimes signals in django are triggered twice. In the docs it says that a good way to create a (unique) dispatch_uid
is either the path or name of the module[1] or the id of any hashable object[2].
Today I tried this:
import time
my_signal.connect(my_function, dispatch_uid=str(time.time()))
However I am afraid that in a multiuser environment (like in the case of a web site). This might be broken. What is a good and safe way to create such an id in a multiuser environment?
[1] https://code.djangoproject.com/wiki/Signals
[2] https://docs.djangoproject.com/en/dev/topics/signals/#preventing-duplicate-signals