MCPcopy Create free account
hub / github.com/celery/celery / __init__

Method __init__

celery/utils/threads.py:325–337  ·  view source on GitHub ↗
(self, locals=None, ident_func=None)

Source from the content-addressed store, hash-verified

323 """
324
325 def __init__(self, locals=None, ident_func=None):
326 if locals is None:
327 self.locals = []
328 elif isinstance(locals, Local):
329 self.locals = [locals]
330 else:
331 self.locals = list(locals)
332 if ident_func is not None:
333 self.ident_func = ident_func
334 for local in self.locals:
335 object.__setattr__(local, '__ident_func__', ident_func)
336 else:
337 self.ident_func = get_ident
338
339 def get_ident(self):
340 """Return context identifier.

Callers

nothing calls this directly

Calls 1

__setattr__Method · 0.45

Tested by

no test coverage detected