Esempio n. 1
0
def set_server_meta(server_meta):
    return dict_set(get_threadlocal(), ["server_meta"], server_meta)
Esempio n. 2
0
def set_request_meta(request_meta):
    return dict_set(get_threadlocal(), ["request_meta"], request_meta)
Esempio n. 3
0
def get_server_meta():
    server_meta = dict_get(get_threadlocal(), ["server_meta"], {})
    set_server_meta(server_meta)
    return server_meta
Esempio n. 4
0
def set_new_request_id():
    request_id = generate_request_id()
    dict_set(get_threadlocal(), ["request_meta", "request_id"], request_id)
    return request_id
Esempio n. 5
0
def get_request_meta():
    request_meta = dict_get(get_threadlocal(), ["request_meta"], {})
    # write back dictionary in case it was newly created
    set_request_meta(request_meta)
    return request_meta
Esempio n. 6
0
def set_server_meta(server_meta):
    return dict_set(get_threadlocal(), ["server_meta"], server_meta)
Esempio n. 7
0
def get_request_id():
    return dict_get(get_threadlocal(), ["request_meta", "request_id"], None)
Esempio n. 8
0
def get_server_meta():
    server_meta = dict_get(get_threadlocal(), ["server_meta"], {})
    set_server_meta(server_meta)
    return server_meta
Esempio n. 9
0
def set_request_meta(request_meta):
    return dict_set(get_threadlocal(), ["request_meta"], request_meta)
Esempio n. 10
0
def get_request_meta():
    request_meta = dict_get(get_threadlocal(), ["request_meta"], {})
    # write back dictionary in case it was newly created
    set_request_meta(request_meta)
    return request_meta
Esempio n. 11
0
def set_new_request_id():
    request_id = generate_request_id()
    dict_set(get_threadlocal(), ["request_meta", "request_id"], request_id)
    return request_id 
Esempio n. 12
0
def get_request_id():
    return dict_get(get_threadlocal(), ["request_meta", "request_id"], None)