You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/12/13 03:16:16 UTC

[GitHub] [dolphinscheduler] insist777 commented on a diff in pull request #13070: [Feature][API] New restful API for taskInstance

insist777 commented on code in PR #13070:
URL: https://github.com/apache/dolphinscheduler/pull/13070#discussion_r1046618977


##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskInstanceServiceImpl.java:
##########
@@ -306,4 +306,31 @@ public Result stopTask(User loginUser, long projectCode, Integer taskInstanceId)
 
         return result;
     }
+
+    @Override
+    public Result queryTaskInstanceByCode(User loginUser, long projectCode, Long taskCode) {
+        Result result = new Result();
+
+        Project project = projectMapper.queryByCode(projectCode);
+        // check user access for project
+        Map<String, Object> checkResult =
+                projectService.checkProjectAndAuth(loginUser, project, projectCode, FORCED_SUCCESS);
+        Status status = (Status) checkResult.get(Constants.STATUS);
+        if (status != Status.SUCCESS) {
+            putMsg(result, status);
+            return result;
+        }

Review Comment:
   done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org