Exemple #1
0
def _get_asynchronous_result(huey_app: RedisHuey, huey_task_id: str):
    try:
        huey_task = huey_app.result(huey_task_id)
    except TaskException as e:
        try:
            for import_exception in imported_exceptions:
                exec(import_exception)
            task_exception = eval(e.metadata["error"])
        except NameError:
            task_exception = Exception(e.metadata["error"])
        raise task_exception
    return huey_task
Exemple #2
0
def _get_asynchronous_task(huey_task_id: str, huey_app: RedisHuey):
    try:
        return huey_app.result(huey_task_id, preserve=True)
    except:
        return "Exception"