Application
The Moore.options
object holds an instance of PyConf.application.ApplicationOptions
.
The other members of the Moore
module are used for high-level application
configuration. Most ‘main’ options files will call Moore.run_moore
.
- run_moore(options, make_streams=None, public_tools=[], analytics=False, exclude_incompatible=True)[source]
Configure Moore’s entire control and data flow.
Convenience function that configures all services, creates the standard Moore control flow and builds the the data flow (by calling the global lines maker).
If
make_streams
returns a list of lines, a default stream definition is created from it named “default”``.- Parameters
options (ApplicationOptions) – holder of application options
make_streams – function returning dict of {stream :
DecisionLine
objects}) OR a list ofDecisionLine
objectspublic_tools (list) – list of public
Tool
instances to configureanalytics (bool, optional) – For use only in rate/event size analysis. Defaults to False.
exclude_incompatible (bool, optional) – Exclude the lines that are incompatible with multithreaded mode. Defaults to True.
- moore_control_flow(options, streams, process, analytics=False)[source]
Return the Moore application control flow node.
Combines the lines with
NONLAZY_OR
logic in a global decision control flow node. This isLAZY_AND
-ed with the output control flow, which consists of Moore-specific report makers/writers and generic persistency.- Parameters
options (ApplicationOptions) – holder of application options
streams (list of stream objects) – control flow nodes of lines
process (str) – “hlt1”, “hlt2”, “spruce” or “pass”.
analytics (bool, optional) – For use only in rate/event size analysis. Defaults to False.
- Returns
Application control flow.
- Return type
node (CompositeNode)