ThreadConfig
- class DIRAC.Core.DISET.ThreadConfig.ThreadConfig(*args, **kwargs)
Bases:
_local
This class allows to contain extra information when a call is done on behalf of somebody else. Typically, when a host performs the request on behalf of a user. It is not used inside DIRAC, but is used in WebAppDIRAC for example
Note that the class is a singleton, meaning that you share the same object in the whole process, however the attributes are thread locals (because of the threading.local inheritance).
Also, this class has to be populated manually, no Client class will do it for you.
- __init__()
- dump()
Return extra information
- Returns
tuple
- getDN()
Return DN
- Returns
str
- getDecorator()
Return decorator
- Returns
decorator
- getGroup()
Return group name
- Returns
str
- getID()
Return user ID
- Returns
tuple
- getSetup()
Return setup name
- Returns
str
- instance = <DIRAC.Core.DISET.ThreadConfig.ThreadConfig object>
- reset()
Reset extra information
- setDecorator(deco)
Set decorator
- Parameters
deco – decorator
- DIRAC.Core.DISET.ThreadConfig.threadDeco(method)
Tread decorator
- Parameters
method – method
- Returns
wrapped method