<s> import click <EOL> from mass . monitor . app import app <EOL> from mass . scheduler . swf import utils <EOL> from mass . scheduler . swf import SWFWorker <EOL> @ click . group ( ) <EOL> def cli ( ) : <EOL> pass <EOL> @ cli . command ( ) <EOL> def init ( ) : <EOL> utils . register_domain ( ) <EOL> utils . register_workflow_type ( ) <EOL> utils . register_activity_type ( ) <EOL> @ cli . group ( ) <EOL> def worker ( ) : <EOL> pass <EOL> @ cli . group ( ) <EOL> def job ( ) : <EOL> pass <EOL> @ cli . group ( ) <EOL> def monitor ( ) : <EOL> pass <EOL> @ worker . command ( '<STR_LIT:start>' ) <EOL> def worker_start ( ) : <EOL> worker = SWFWorker ( ) <EOL> worker . start ( ) <EOL> @ job . command ( '<STR_LIT>' ) <EOL> @ click . option ( '<STR_LIT>' , '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> @ click . option ( '<STR_LIT>' , '<STR_LIT>' , help = '<STR_LIT>' ) <EOL> def job_submit ( json_script , alf_script ) : <EOL> pass <EOL> @ monitor . command ( '<STR_LIT:start>' ) <EOL> def monitor_start ( ) : <EOL> monitor = app . run ( debug = True ) <EOL> cli . add_command ( init ) <EOL> cli . add_command ( worker ) <EOL> cli . add_command ( job ) <EOL> cli . add_command ( monitor ) </s>
