MCPcopy
hub / github.com/celery/celery / EmbeddedService

Function EmbeddedService

celery/beat.py:727–738  ·  view source on GitHub ↗

Return embedded clock service. Arguments: thread (bool): Run threaded instead of as a separate process. Uses :mod:`multiprocessing` by default, if available.

(app, max_interval=None, **kwargs)

Source from the content-addressed store, hash-verified

725
726
727def EmbeddedService(app, max_interval=None, **kwargs):
728 """Return embedded clock service.
729
730 Arguments:
731 thread (bool): Run threaded instead of as a separate process.
732 Uses :mod:`multiprocessing` by default, if available.
733 """
734 if kwargs.pop('thread', False) or _Process is None:
735 # Need short max interval to be able to stop thread
736 # in reasonable time.
737 return _Threaded(app, max_interval=1, **kwargs)
738 return _Process(app, max_interval=max_interval, **kwargs)

Callers 1

createMethod · 0.90

Calls 3

_ThreadedClass · 0.85
_ProcessClass · 0.85
popMethod · 0.45

Tested by

no test coverage detected