MCPcopy
hub / github.com/celery/celery / signum

Method signum

celery/platforms.py:647–656  ·  view source on GitHub ↗

Get signal number by name.

(self, name)

Source from the content-addressed store, hash-verified

645 return True
646
647 def signum(self, name):
648 """Get signal number by name."""
649 if isinstance(name, numbers.Integral):
650 return name
651 if not isinstance(name, str) \
652 or not name.isupper():
653 raise TypeError('signal name must be uppercase string.')
654 if not name.startswith('SIG'):
655 name = 'SIG' + name
656 return getattr(_signal, name)
657
658 def reset(self, *signal_names):
659 """Reset signals to the default signal handler.

Callers 12

supportedMethod · 0.95
__getitem__Method · 0.95
__setitem__Method · 0.95
test_signumMethod · 0.80
test_ignoreMethod · 0.80
test_resetMethod · 0.80
set_pdeathsigFunction · 0.80
_revokeFunction · 0.80
terminateMethod · 0.80
cancelMethod · 0.80
_find_sig_argumentMethod · 0.80

Calls

no outgoing calls

Tested by 3

test_signumMethod · 0.64
test_ignoreMethod · 0.64
test_resetMethod · 0.64