예제 #1
0
        monitorReport.mydate = MyDate(mydate)

        logdir = "/home/qs/scripts/video_report_yyyymm/" + monitorReport.mydate.get_now(
        ) + "/"
        checkpoint_log = logdir + 'checkpoint.log'

        map_store = fileRead.map_store_recover(checkpoint_log)
        mysqlWrap.insert_report(map_store)
        mysqlWrap.update_report_patch()

    elif cmp(sys.argv[1], '-Dadmobile') == 0:
        mydate = Util.get_yesterday()
        if len(sys.argv) == 3:
            mydate = sys.argv[2]
        monitorReport.__setattr__("mydate", MyDate(mydate))
        adfileRead = AdReadFile(monitorReport)
        mysqlWrap = ReportMysql(ReportMysql.conn_mobile_params, monitorReport)

        logdir = "/home/qs/scripts/video_report_yyyymm/" + monitorReport.mydate.get_now(
        ) + "/"
        adfileRead.read_file(logdir + "ORACLE_SQL.log")

        mysqlWrap.insert_ad(monitorReport.map_store)

    elif cmp(sys.argv[1], '-DupdateAssignField') == 0:
        updateAssignField = 'all'
        mydate = Util.get_yesterday()
        if len(sys.argv) >= 3:
            updateAssignField = sys.argv[2]
        if len(sys.argv) == 4:
            mydate = sys.argv[3]
예제 #2
0
        monitorReport.mydate = MyDate(mydate)

        logdir = "/opt/video_report_yyyymm/mobile/" + monitorReport.mydate.get_now(
        ) + "/"
        checkpoint_log = logdir + 'checkpoint.log'

        map_store = fileRead.map_store_recover(checkpoint_log)
        mysqlWrap.insert_report(map_store)
        mysqlWrap.update_report_patch()

    elif cmp(sys.argv[1], '-Dadmobile') == 0:
        mydate = Util.get_yesterday()
        if len(sys.argv) == 3:
            mydate = sys.argv[2]
        monitorReport.__setattr__("mydate", MyDate(mydate))
        adfileRead = AdReadFile(monitorReport)
        mysqlWrap = ReportMysql(ReportMysql.conn_mobile_params, monitorReport)

        logdir = "/opt/video_report_yyyymm/mobile/" + monitorReport.mydate.get_now(
        ) + "/"
        oracle_log = logdir + 'ORACLE_STOCK_SQL.log'
        oracleWrap = ReportOracleStock(monitorReport,
                                       ReportOracle.conn_oracle_params)
        oracleWrap.write_rows_file(oracle_log)

        adfileRead.read_file(oracle_log)
        mysqlWrap.check_create_table(26)
        mysqlWrap.insert_ad(monitorReport.map_store)

    elif cmp(sys.argv[1], '-DupdateAssignField') == 0:
        updateAssignField = 'all'
예제 #3
0
            mydate = sys.argv[2]
        monitorReport.mydate=MyDate(mydate)

        logdir = "/home/qs/scripts/video_report_yyyymm/"+monitorReport.mydate.get_now()+"/"
        checkpoint_log = logdir + 'checkpoint.log'

        map_store = fileRead.map_store_recover(checkpoint_log)
        mysqlWrap.insert_report(map_store)
        mysqlWrap.update_report_patch()

    elif cmp(sys.argv[1], '-Dadmobile') == 0:
        mydate = Util.get_yesterday()
        if len(sys.argv) == 3:
            mydate = sys.argv[2]
        monitorReport.__setattr__("mydate",MyDate(mydate))
        adfileRead = AdReadFile(monitorReport)
        mysqlWrap = ReportMysql(ReportMysql.conn_mobile_params,monitorReport)

        logdir = "/home/qs/scripts/video_report_yyyymm/"+monitorReport.mydate.get_now()+"/"
        adfileRead.read_file(logdir + "ORACLE_SQL.log")

        mysqlWrap.insert_ad(monitorReport.map_store)

    elif cmp(sys.argv[1], '-DupdateAssignField') == 0:
        updateAssignField = 'all'
        mydate = Util.get_yesterday()
        if len(sys.argv) >= 3:
            updateAssignField=sys.argv[2]
        if len(sys.argv) == 4:
            mydate = sys.argv[3]
        monitorReport.mydate=MyDate(mydate)
예제 #4
0
            mydate = sys.argv[2]
        monitorReport.mydate=MyDate(mydate)

        logdir = "/opt/video_report_yyyymm/mobile/"+monitorReport.mydate.get_now()+"/"
        checkpoint_log = logdir + 'checkpoint.log'

        map_store = fileRead.map_store_recover(checkpoint_log)
        mysqlWrap.insert_report(map_store)
        mysqlWrap.update_report_patch()

    elif cmp(sys.argv[1], '-Dadmobile') == 0:
        mydate = Util.get_yesterday()
        if len(sys.argv) == 3:
            mydate = sys.argv[2]
        monitorReport.__setattr__("mydate",MyDate(mydate))
        adfileRead = AdReadFile(monitorReport)
        mysqlWrap = ReportMysql(ReportMysql.conn_mobile_params,monitorReport)

        logdir = "/opt/video_report_yyyymm/mobile/"+monitorReport.mydate.get_now()+"/"
        oracle_log = logdir + 'ORACLE_STOCK_SQL.log'
        oracleWrap = ReportOracleStock(monitorReport,ReportOracle.conn_oracle_params)
        oracleWrap.write_rows_file(oracle_log)

        adfileRead.read_file(oracle_log)
        mysqlWrap.check_create_table(26)
        mysqlWrap.insert_ad(monitorReport.map_store)

    elif cmp(sys.argv[1], '-DupdateAssignField') == 0:
        updateAssignField = 'all'
        mydate = Util.get_yesterday()
        if len(sys.argv) >= 3: