示例#1
0
def experiment_MainObj_main_download_listings():
    """Experiment with DaemonMain.run_daemon"""
    from clair.daemon import DaemonMain
    
    print "start"

    conf_dir = relative("../../../../clair-data")
    data_dir = relative("../../../../clair-data")
#    conf_dir = relative("../../example-data-1")
#    data_dir = relative("../../example-data-1")
    
    m = DaemonMain(conf_dir, data_dir)
    
    m.run_daemon(-1)
    
    print "finished!"
示例#2
0
def test_MainObj_main_download_listings():
    """Test DaemonMain.run_daemon"""
    
    from clair.daemon import DaemonMain

    example_data = relative("../../example-data")
    conf_dir = relative("../../test-data/test-download-listings")
    data_dir = relative("../../test-data/test-download-listings")
    
    #Create a fresh copy of the example data
    os.system("rm -rf " + data_dir)
    os.system("cp -r " + example_data + " " + data_dir)
    
    m = DaemonMain(conf_dir, data_dir)
    
    m.run_daemon(1)
    
    print "finished!"