Example #1
0
 def wrapper(*args, **kwargs):
     start = time.time()
     ret = func(*args, **kwargs)
     now = time.time()
     timeused = int((now - start) * 1000)
     lock = globl.get_value('lock')
     with lock:
         value = globl.get_value('value')
         value.append((now, timeused))
     return ret
Example #2
0
def pbar_get_size():
    size = globl.get_value('pbar_value').value
    return size
Example #3
0
def pbar_add_size(size):
    lock = globl.get_value('pbar_lock')
    with lock:
        globl.get_value('pbar_value').value += size
Example #4
0
def force_exit():
    return globl.get_value('force_exit').value
Example #5
0
def part_faild(pid):
    return pid in globl.get_value('part_task_failed')
Example #6
0
def sleep_over():
    while globl.get_value('isflow_sleep').value:
        time.sleep(0.5)
    return True