コード例 #1
0
ファイル: online.py プロジェクト: thomasvs/dad
    def cb(path):
        log.log('check', 'statting path %r', path)
        # nfs can make these calls take long
        before = time.time()
        res = os.path.exists(path)
        if time.time() - before > 2.0:
            log.warning('check', 'slow filesystem for %r' % path)
        
        if res:
            return True

        print "%s offline" % path.encode('utf-8')
コード例 #2
0
ファイル: lookup.py プロジェクト: thomasvs/dad
 def eb(failure):
     log.warning('load', 'Failed to query view: %r',
         log.getFailureMessage(failure))
     return failure