MCPcopy Index your code
hub / github.com/diffgram/diffgram / task_next_core

Function task_next_core

default/methods/task/task/task_next.py:39–67  ·  view source on GitHub ↗
(session,
                   job_id,
                   project_string_id,
                   task_id,
                   input)

Source from the content-addressed store, hash-verified

37
38@Permission_Task.by_task_id(apis_user_list=["builder_or_trainer"])
39def task_next_core(session,
40 job_id,
41 project_string_id,
42 task_id,
43 input):
44
45 assign_to_user = input['assign_to_user']
46
47 if assign_to_user is True:
48 task = Task.get_task_from_job_id(
49 session=session,
50 job_id=job_id,
51 user = User.get(session),
52 direction=input['direction'],
53 assign_to_user=assign_to_user)
54
55 else:
56 task = Task.navigate_tasks_relative_to_given_task(
57 session=session,
58 task_id=task_id,
59 direction=input['direction']
60 )
61
62 if not task:
63 return False
64
65 task_serialized = task.serialize_builder_view_by_id(session)
66
67 return task_serialized

Callers 1

task_nextFunction · 0.85

Calls 4

get_task_from_job_idMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected