MCPcopy Create free account
hub / github.com/dask/dask / execute_task

Function execute_task

dask/local.py:246–263  ·  view source on GitHub ↗

Compute task and handle all administration See Also -------- _execute_task : actually execute task

(key, task_info, dumps, loads, get_id, pack_exception)

Source from the content-addressed store, hash-verified

244
245
246def execute_task(key, task_info, dumps, loads, get_id, pack_exception):
247 """
248 Compute task and handle all administration
249
250 See Also
251 --------
252 _execute_task : actually execute task
253 """
254 try:
255 task, data = loads(task_info)
256 result = task(data)
257 id = get_id()
258 result = dumps((result, id))
259 failed = False
260 except BaseException as e:
261 result = pack_exception(e, dumps)
262 failed = True
263 return key, result, failed
264
265
266def batch_execute_tasks(it):

Callers 1

batch_execute_tasksFunction · 0.85

Calls 1

pack_exceptionFunction · 0.70

Tested by

no test coverage detected