Example #1
0
def test_save_sequences():
    context = get_default_app_context()
    store = context.provider_mgr.get(DataStore.Mongo)
    store.start(app_context=context)

    seq_mgr = SequenceManager()
    seq_mgr.start(app_context=context)

    print seq_mgr.get_next_sequence("order")
    print seq_mgr.get_next_sequence("order")

    print seq_mgr.get_next_sequence("trade")
    print seq_mgr.get_next_sequence("trade")

    seq_mgr.stop()

    seq_mgr = SequenceManager()
    seq_mgr.start(app_context=context)
Example #2
0
def test_save_sequences():
    context = get_default_app_context()
    store = context.provider_mgr.get(DataStore.Mongo)
    store.start(app_context=context)

    seq_mgr = SequenceManager()
    seq_mgr.start(app_context=context)

    print seq_mgr.get_next_sequence("order")
    print seq_mgr.get_next_sequence("order")

    print seq_mgr.get_next_sequence("trade")
    print seq_mgr.get_next_sequence("trade")

    seq_mgr.stop()

    seq_mgr = SequenceManager()
    seq_mgr.start(app_context=context)