MCPcopy Create free account
hub / github.com/doccano/doccano / get

Method get

backend/api/views.py:10–21  ·  view source on GitHub ↗
(self, request, *args, **kwargs)

Source from the content-addressed store, hash-verified

8 permission_classes = (IsAuthenticated,)
9
10 def get(self, request, *args, **kwargs):
11 task = AsyncResult(kwargs["task_id"])
12 ready = task.ready()
13 error = ready and not task.successful()
14
15 return Response(
16 {
17 "ready": ready,
18 "result": task.result if ready and not error else None,
19 "error": {"text": str(task.result)} if error else None,
20 }
21 )

Callers 7

process_responseMethod · 0.45
process_requestMethod · 0.45
_assert_sslmode_isMethod · 0.45
_assert_user_isMethod · 0.45
assert_fetchMethod · 0.45
copy_annotationFunction · 0.45
handleMethod · 0.45

Calls

no outgoing calls

Tested by 2

_assert_sslmode_isMethod · 0.36
_assert_user_isMethod · 0.36