zhongjiajie commented on code in PR #10551:
URL: https://github.com/apache/dolphinscheduler/pull/10551#discussion_r905038210


##########
dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/task.py:
##########
@@ -170,6 +171,22 @@ def process_definition(self, process_definition: 
Optional[ProcessDefinition]):
         """Set attribute process_definition."""
         self._process_definition = process_definition
 
+    @property
+    def resource_list(self) -> List:
+        """Get task define attribute `resource_list`."""
+        resources = set()
+        for resource in self._resource_list:
+            if type(resource) == str:
+                
resources.add(self.query_resource(resource).get(ResourceKey.ID))
+            elif type(resource) == dict and resource.get(ResourceKey.ID) is 
not None:
+                logger.warning(
+                    """Resource_list should be defined using List[str] with 
resource paths,

Review Comment:
   ```suggestion
                       """`resource_list` should be defined using List[str] 
with resource paths,
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to