Example #1
0
def prStock(mypipe):
    shutdown = False
    st = Stock()
    while not shutdown:
        if not st.doWork():
            time.sleep(1)
        if mypipe.poll():
            shutdown = mypipe.recv()
Example #2
0
def prStock():
    global core2log
    shutdown = False
    st = Stock()
    while not shutdown:
        try:
            if not st.doWork():
                time.sleep(1)
        except:
            errorstr = traceback.format_exc()
            print errorstr
            core2log.error('<Stock>\n{0}'.format(errorstr))
            raw_input()