程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> 其他數據庫知識 >> MSSQL >> sqlserver索引的道理及索引樹立的留意事項小結

sqlserver索引的道理及索引樹立的留意事項小結

編輯:MSSQL

sqlserver索引的道理及索引樹立的留意事項小結。本站提示廣大學習愛好者:(sqlserver索引的道理及索引樹立的留意事項小結)文章只能為提供參考,不一定能成為您想要的結果。以下是sqlserver索引的道理及索引樹立的留意事項小結正文


Inotify地址:拜訪

# -*- coding:utf-8 -*-

import os
import pyinotify
from functions import *

WATCH_PATH = '' #監控目次

if not WATCH_PATH:
  wlog('Error',"The WATCH_PATH setting MUST be set.")
  sys.exit()
else:
  if os.path.exists(WATCH_PATH):
    wlog('Watch status','Found watch path: path=%s.' % (WATCH_PATH))
  else:
    wlog('Error','The watch path NOT exists, watching stop now: path=%s.' % (WATCH_PATH))
    sys.exit()

class OnIOHandler(pyinotify.ProcessEvent):
  def process_IN_CREATE(self, event):
    wlog('Action',"create file: %s " % os.path.join(event.path,event.name))

  def process_IN_DELETE(self, event):
    wlog('Action',"delete file: %s " % os.path.join(event.path,event.name))

  def process_IN_MODIFY(self, event):
    wlog('Action',"modify file: %s " % os.path.join(event.path,event.name))

def auto_compile(path = '.'):
  wm = pyinotify.WatchManager()
  mask = pyinotify.IN_CREATE | pyinotify.IN_DELETE | pyinotify.IN_MODIFY
  notifier = pyinotify.ThreadedNotifier(wm, OnIOHandler())
  notifier.start()
  wm.add_watch(path, mask,rec = True,auto_add = True)
  wlog('Start Watch','Start monitoring %s' % path)
  while True:
    try:
      notifier.process_events()
      if notifier.check_events():
        notifier.read_events()
    except KeyboardInterrupt:
      notifier.stop()
      break

if __name__ == "__main__":
   auto_compile(WATCH_PATH)

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved