Example #1
0
def start_durus(host, port, logfilename, dbfilename):
    logfile = open(logfilename, 'a+')
    direct_output(logfile)
    logger.setLevel(9)
    storage = FileStorage(dbfilename, repair=False, readonly=False)
    log(20, 'Storage file=%s host=%s port=%s', storage.get_filename(), host, port)
    StorageServer(storage, host=host, port=port).serve()
Example #2
0
def start_durus(host, port, logfilename, dbfilename):
    logfile = open(logfilename, 'a+')
    direct_output(logfile)
    logger.setLevel(9)
    storage = FileStorage(dbfilename, repair=False, readonly=False)
    log(20, 'Storage file=%s host=%s port=%s', storage.get_filename(), host,
        port)
    StorageServer(storage, host=host, port=port).serve()
Example #3
0
def startDurus(host, port, logfilename, dbfilename):
    """Start and initialize the Durus server component.

  Also opens a log file.
  """
    lf = logfile.open(logfilename, 50000)
    direct_output(lf)
    logger.setLevel(9)
    storage = FileStorage(dbfilename, repair=False, readonly=False)
    log(20, 'Storage file=%s host=%s port=%s', storage.get_filename(), host,
        port)
    StorageServer(storage, host=host, port=port).serve()
Example #4
0
def start_durus(host, port, logfilename, dbfilename):
    logfile = open(logfilename, 'a+')
    direct_output(logfile)
    logger.setLevel(9)
    storage = FileStorage(dbfilename, repair=False, readonly=False)
    """ 
    In Durus 2.6, there was a fp.name member data.  However it doesn't exist in Durus 2.7.
    However, in both 2.6 and 2.7, there is a get_filename() method that will work.
    #log(20, 'Storage file=%s host=%s port=%s', storage.fp.name, host, port)
    """
    log(20, 'Storage file=%s host=%s port=%s',storage.get_filename(), host, port)
    StorageServer(storage, host=host, port=port).serve()