本文整理汇总了Python中pythonFrame.myUtils.Util.Util.get_yesterday方法的典型用法代码示例。如果您正苦于以下问题:Python Util.get_yesterday方法的具体用法?Python Util.get_yesterday怎么用?Python Util.get_yesterday使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pythonFrame.myUtils.Util.Util
的用法示例。
在下文中一共展示了Util.get_yesterday方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pythonFrame.myUtils.Util import Util [as 别名]
# 或者: from pythonFrame.myUtils.Util.Util import get_yesterday [as 别名]
def __init__(self):
ReportCDNEntity.__init__(self)
ReportDMEntity.__init__(self)
ReportADEntity.__init__(self)
ReportURLEntity.__init__(self)
self.video_id = 0
self.play_plat = 2
self.is_user_share = 1
self.create_time = time.strftime('%Y-%m-%d %H:%M:%S')
self.dtime = Util.get_yesterday()
示例2: write_hive_shell
# 需要导入模块: from pythonFrame.myUtils.Util import Util [as 别名]
# 或者: from pythonFrame.myUtils.Util.Util import get_yesterday [as 别名]
def write_hive_shell(self, sql_path, log_path):
FileBase.file_exist(sql_path)
Util.file_remove(log_path)
exec_sql = 'touch %s' % log_path
os.popen(exec_sql)
sql = Template(FileRead.file_readlines(sql_path)[0])
temp_sql = sql.substitute(dtime=Util.get_yesterday())
exec_sql = "$HIVE_HOME/bin/hive -S -e '%s' > %s" % (temp_sql, log_path)
os.popen(exec_sql)
示例3: exit
# 需要导入模块: from pythonFrame.myUtils.Util import Util [as 别名]
# 或者: from pythonFrame.myUtils.Util.Util import get_yesterday [as 别名]
exit()
monitorReport = ReportMonitor()
fileRead = ReportReadFile(monitorReport)
fileWrite = FileWrite()
jsonParallel = ReportJsonParallel(monitorReport)
jsonSerial = ReportJsonSerial(monitorReport)
mysqlWrap = ReportMysql(ReportMysql.conn_formal_params,monitorReport)
#mysqlWrap = ReportMysql(ReportMysql.conn_space_params,monitorReport)
if cmp(sys.argv[1], '-Dsave') == 0:
mydate = Util.get_yesterday()
if len(sys.argv) == 3:
mydate = sys.argv[2]
monitorReport.__setattr__("mydate",MyDate(mydate))
logdir = "/home/qs/scripts/video_report_yyyymm/"+monitorReport.mydate.get_now()+"/"
error_log = logdir + 'save_error.log'
retry_timeout_log = logdir + 'retry_timeout.log'
monitor_log = logdir + 'monitor.log'
checkpoint_log = logdir + 'checkpoint.log'
oracle_log = logdir + 'ORACLE_SQL.log'
uids_log = logdir + "uids.log"
Util.file_remove(error_log)
Util.file_remove(retry_timeout_log)
Util.file_remove(monitor_log)
示例4: __init__
# 需要导入模块: from pythonFrame.myUtils.Util import Util [as 别名]
# 或者: from pythonFrame.myUtils.Util.Util import get_yesterday [as 别名]
def __init__(self,path,q,cpu=8,dt=Util.get_yesterday()):
HiveShell.__init__(self,cpu)
self.dt = dt
self.path = path
HiveShell.__init__(self,q)