示例#1
0
 def updateMcastStatus(self, pos):
     self.cursor.execute("update changelog set is_mcast = 1, modify_time = ? where id = ?", (util.getNowTime(), pos))
     self.conn.commit()
示例#2
0
os.system("yum -y install python-devel")

#install setproctitle
os.system("easy_install setproctitle")

#install cherrypy
os.system("easy_install cherrypy")

#install jinja2
os.system("easy_install jinja2")

#install psutil
os.system("easy_install psutil")

#sleep 3
print util.getNowTime()
time.sleep(3)
print util.getNowTime()  


reload(sys)

# check if pyinotify has been installed
try:
    import pyinotify
    print "Installation complete successfully!" 
except ImportError as e:
    sys.stderr.write("Sorry, Installation pyinotify module failure! Please try to install it manually。\n")
    sys.exit(0)

示例#3
0
 def saveDirChangeLog(self, data={"command": "", "filePath": ""}):
     if(len(data) == 0):
         return False
     self.cursor.execute('insert into changelog (command, file_path, add_time, modify_time) values(?, ?, ?, ?)', (data['command'], data['filePath'], util.getNowTime(), util.getNowTime()))
     self.conn.commit()