mirror of https://github.com/celery/kombu.git
oid_from now accepts threads argument that if set to false does not use get_ident()
This commit is contained in:
parent
c457a88459
commit
42c8b17d49
|
@ -53,8 +53,13 @@ def generate_oid(node_id, process_id, thread_id, instance):
|
|||
return str(uuid3(NAMESPACE_OID, ent))
|
||||
|
||||
|
||||
def oid_from(instance):
|
||||
return generate_oid(get_node_id(), os.getpid(), get_ident(), instance)
|
||||
def oid_from(instance, threads=True):
|
||||
return generate_oid(
|
||||
get_node_id(),
|
||||
os.getpid(),
|
||||
get_ident() if threads else 0,
|
||||
instance,
|
||||
)
|
||||
|
||||
|
||||
class Broadcast(Queue):
|
||||
|
|
Loading…
Reference in New Issue