# Salt Master Worker Floscript.
#
# This controls a single worker proc, many are started based on the value in worker_threads

house worker

framer uxdrouter be active first setup
    frame setup
        do salt raet worker setup at enter
        go zmqsetup
        go raetstart

    frame zmqsetup
        # Only enter if configured to run dual head
        let me if .salt.etc.zmq_behavior
        bid start zmqworker
        go raetstart

    frame raetstart
        bid start raetworker

framer raetworker be inactive first start
    frame start
        do salt raet worker router
        exit
            do salt raet lane stack closer per inode ".salt.lane.manor."

framer zmqworker be inactive first start
    frame start
        do salt zmq worker
