Skip to content

Commit

Permalink
Delete dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter committed Nov 23, 2022
1 parent 6cf3957 commit 5d10974
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions distributed/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3033,42 +3033,6 @@ def apply_function_simple(
return msg


async def apply_function_async(
function,
args,
kwargs,
time_delay,
):
"""Run a function, collect information
Returns
-------
msg: dictionary with status, result/error, timings, etc..
"""
ident = threading.get_ident()
start = time()
try:
result = await function(*args, **kwargs)
except Exception as e:
msg = error_message(e)
msg["op"] = "task-erred"
msg["actual-exception"] = e
else:
msg = {
"op": "task-finished",
"status": "OK",
"result": result,
"nbytes": sizeof(result),
"type": type(result) if result is not None else None,
}
finally:
end = time()
msg["start"] = start + time_delay
msg["stop"] = end + time_delay
msg["thread"] = ident
return msg


def apply_function_actor(
function, args, kwargs, execution_state, key, active_threads, active_threads_lock
):
Expand Down

0 comments on commit 5d10974

Please sign in to comment.