Ejemplo n.º 1
0
def test_app():
    for n in xrange(2):
        brttpkt.get_rvals.appendleft((n, 'foobar', n*5, makepkt(n*5)))

    from wavefront.controller import App

    app = App()
    orb = app.add_orb('anfprelim')
    orb.add_binner('channet_chansta_chanchan_chanloc', twin=10.0, tbin=5.0)
    make_mock_proc_orb(2, app, orb)
    app.start()
    gevent.wait()

    eq_('[(0.0, 5, 0, 3.0, 5), (5.0, 5, 0, 3.0, 5)]',
        str(list(orb.binners.binners['channet_chansta_chanchan_chanloc'].pop().store.itervalues())))

    ok_(app.successful())
Ejemplo n.º 2
0
    Base,
    )


import sys

def _janitor(src):
    log.critical("Waveform controller died")
    sys.exit(1)

#for n in xrange(2):
#    brttpkt.get_rvals.appendleft((n, 'foobar', n*5, makepkt(n*5)))

twin = 86400.0

wfcontroller = WfController()
wfcontroller.link_exception(_janitor)
#orb = wfcontroller.add_orb('anfexport:usarrayTA', select='TA_058A.*', tafter=time.time() - twin)
#orb.add_binner('TA_058A_BHZ', twin=3600.0, tbin=10.0)
#orb.add_binner('TA_058A_BHZ', twin=7200.0, tbin=20.0)
#orb.add_binner('TA_058A_BHZ', twin=86400.0, tbin=240.0)
#orb.add_binner('TA_058A_LHZ', twin=86400.0, tbin=240.0)
#orb.add_binner('TA_058A_LDM_EP', twin=86400.0, tbin=10.0)
#make_mock_proc_orb(2, wfcontroller, orb)

srcs = """
TA_TOLK_BHZ_01 TA_HDA_BHZ TA_D50A_BHZ TA_D56A_BHZ TA_E44A_BHZ TA_E47A_BHZ
TA_E53A_BHZ TA_F61A_BHZ TA_F48A_BHZ TA_G54A_BHZ TA_G47A_BHZ TA_H48A_BHZ
TA_H55A_BHZ TA_I48A_BHZ TA_I49A_BHZ TA_J46A_BHZ TA_K48A_BHZ TA_K43A_BHZ
TA_L55A_BHZ TA_L46A_BHZ TA_M59A_BHZ TA_M55A_BHZ TA_M58A_BHZ TA_N51A_BHZ
TA_N60A_BHZ TA_N50A_BHZ TA_O56A_BHZ TA_O54A_BHZ TA_O52A_BHZ TA_P46A_BHZ