예제 #1
0
파일: analyze.py 프로젝트: trmznt/genaf
def main(args):

    cerr('genaf analyze main()')

    settings = setup_settings( args )

    do_analyze( args, settings )
예제 #2
0
파일: rbmgr.py 프로젝트: trmznt/genaf
def main(args):

    cerr('[genaf] rbmgr main()')

    rhombus_main( args )

    return

    settings = setup_settings( args )

    if any( (args.exportuserclass, args.exportgroup, args.exportenumkey) ):
        do_dbmgr( args, settings )

    elif not args.rollback and not args.test and (args.commit or args.initdb):
        with transaction.manager:
            do_dbmgr( args, settings )
            cerr('** COMMIT database **')

    else:
        cerr('** WARNING -- running without database COMMIT **')
        if not args.rollback and not args.test:
            keys = input('Do you want to continue [y/n]: ')
            if keys.lower()[0] != 'y':
                sys.exit(1)
        do_dbmgr( args, settings )
예제 #3
0
def main():
    greet()

    # preparing everything
    p = arg_parser('genaf-base-shell')
    args = p.parse_args(sys.argv[1:])

    settings = setup_settings(args)
    dbh = get_dbhandler(settings)

    from IPython import embed
    import transaction
    embed()
예제 #4
0
파일: shell.py 프로젝트: trmznt/cmsfix
def main():
    greet()

    # preparing everything
    p = arg_parser('cmsfix-shell')
    args = p.parse_args(sys.argv[1:])

    settings = setup_settings( args )
    dbh = get_dbhandler(settings)
    set_index_service( IndexService(settings['cmsfix.whoosh.path']) )

    from IPython import embed
    embed()
예제 #5
0
파일: dbmgr.py 프로젝트: trmznt/genaf-snp
def main(args):

    settings = setup_settings(args)

    if not args.test and args.commit:
        with transaction.manager:
            do_dbmgr(args, settings)
            cerr('** COMMIT database **')

    else:
        cerr('** WARNING -- running without database COMMIT **')
        if not args.test:
            keys = input('Do you want to continue [y/n]: ')
            if keys.lower()[0] != 'y':
                sys.exit(1)
        do_dbmgr(args, settings)
예제 #6
0
파일: facmd.py 프로젝트: trmznt/genaf
def main(args):

    cerr('genaf facmd main()')

    settings = setup_settings( args )

    if args.commit:
        with transaction.manager:
            do_facmd( args, settings )
            cerr('** COMMIT database **')

    else:
        cerr('** WARNING -- running without database COMMIT **')
        if not args.test:
            keys = input('Do you want to continue? ')
            if keys.lower()[0] != 'y':
                sys.exit(1)
        do_facmd( args, settings )
예제 #7
0
def main(args):

    # initialize database
    cerr('initialize ')
    settings = setup_settings(args)
    get_dbhandler(settings)

    # init taskqueue here
    cerr('initialize taskcache')
    init_taskcache(settings)

    # running working

    with Connection():

        cerr('running worker')
        w = Worker(settings['genaf.taskqueue.name'])
        w.work()