<s> """<STR_LIT>""" <EOL> import json <EOL> from flask_script import Manager <EOL> from redash import settings , models , __version__ <EOL> from redash . wsgi import app <EOL> from redash . cli import users , database , data_sources , organization <EOL> from redash . monitor import get_status <EOL> manager = Manager ( app ) <EOL> manager . add_command ( "<STR_LIT>" , database . manager ) <EOL> manager . add_command ( "<STR_LIT>" , users . manager ) <EOL> manager . add_command ( "<STR_LIT>" , data_sources . manager ) <EOL> manager . add_command ( "<STR_LIT>" , organization . manager ) <EOL> @ manager . command <EOL> def version ( ) : <EOL> """<STR_LIT>""" <EOL> print __version__ <EOL> @ manager . command <EOL> def status ( ) : <EOL> print json . dumps ( get_status ( ) , indent = <NUM_LIT:2> ) <EOL> @ manager . command <EOL> def runworkers ( ) : <EOL> """<STR_LIT>""" <EOL> print "<STR_LIT>" <EOL> @ manager . shell <EOL> def make_shell_context ( ) : <EOL> from redash . models import db <EOL> return dict ( app = app , db = db , models = models ) <EOL> @ manager . command <EOL> def check_settings ( ) : <EOL> """<STR_LIT>""" <EOL> for name , item in settings . all_settings ( ) . iteritems ( ) : <EOL> print "<STR_LIT>" . format ( name , item ) <EOL> @ manager . command <EOL> def send_test_mail ( ) : <EOL> from redash import mail <EOL> from flask_mail import Message <EOL> mail . send ( Message ( subject = "<STR_LIT>" , recipients = [ settings . MAIL_DEFAULT_SENDER ] , body = "<STR_LIT>" ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> manager . run ( ) </s>
