Beispiel #1
0
def processSuu(cursor):
    if not isRunning_suu: return
    try:
        data = cursor.next()
        res = send_Suu(data).json()
        if DEBUG: print(Tc.CVIOLET, 'SUU', res, Tc.CEND)
    except Exception as e:
        print('fake.py > processSuu(cursor) > error =', Tc.CREDBG2, e, Tc.CEND)
    finally:
        threading_func_wrapper(lambda: processSuu(cursor), 2)
Beispiel #2
0
def processPs(cursor):
    if not isRunning_psScraper: return
    try:
        data = cursor.next()
        # if DEBUG: print("temp_ps_2020_11_12: ", data['time']['date'].replace('_', '/'), data['time']['time'].replace('_', ':') )
        res = send_ps(data).json()
        if DEBUG: print(Tc.CYELLOW, 'PS', res, Tc.CEND)
    except Exception as e:
        print('fake.py > processPS(cursor) > error =', Tc.CREDBG2, e, Tc.CEND)
    finally:
        threading_func_wrapper(lambda: processPs(cursor), 2)
Beispiel #3
0
def foo():
    threading_func_wrapper(lambda: fakeScrapers(
        HOSE_2020_11_09, step=2, hour=9, minute=5, interval=3, fHose=fooHose))
Beispiel #4
0
def starts():
    threading_func_wrapper(
        lambda: run_simple('localhost', FAKE_LISTENER_PORT, app))
Beispiel #5
0
def starts():
    threading_func_wrapper(
        lambda: run_simple('localhost', EOD_HOSE_LISTEN_PORT, app))