Allow non hashable args/kwargs
NamedTuple hash is the hash of all args, we don't really want this. args/kwargs can be non-hashable. So we use our own class.
This commit is contained in:
parent
9a19bf0748
commit
9f006f2860
|
@ -32,10 +32,12 @@ SIGNAL_TO_NAME = dict((getattr(signal, name), name) for name in dir(signal)
|
|||
'SIG_IGN'))
|
||||
|
||||
|
||||
_ServiceConfig = collections.namedtuple("ServiceConfig", ["service",
|
||||
"workers",
|
||||
"args",
|
||||
"kwargs"])
|
||||
class _ServiceConfig(object):
|
||||
def __init__(self, service, workers, args, kwargs):
|
||||
self.service = service
|
||||
self.workers = workers
|
||||
self.args = args
|
||||
self.kwargs = kwargs
|
||||
|
||||
|
||||
def _spawn(target):
|
||||
|
|
Loading…
Reference in New Issue