zhongjiajie commented on code in PR #10792:
URL: https://github.com/apache/dolphinscheduler/pull/10792#discussion_r913527007
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/TenantService.java:
##########
@@ -94,18 +95,23 @@ Map<String, Object> updateTenant(User loginUser, int id,
String tenantCode, int
Result verifyTenantCode(String tenantCode);
/**
- * check if provide tenant code object exists
+ * query tenant by tenant code
*
* @param tenantCode tenant code
- * @return true if tenant code exists, false if not
+ * @return tenant list
*/
- boolean checkTenantExists(String tenantCode);
+ Map<String, Object> queryByTenantCode(String tenantCode);
/**
- * query tenant by tenant code
+ * Make sure tenant with given name exists, and create the tenant if not
exists
+ *
+ * ONLY for python gateway server, and should not use this in web ui
function
*
* @param tenantCode tenant code
- * @return tenant list
+ * @param desc The description of tenant object
+ * @param queue The value of queue which current tenant belong
+ * @param queueName The name of queue which current tenant belong
+ * @return Tenant object
*/
- Map<String, Object> queryByTenantCode(String tenantCode);
+ Tenant crtTenantIfNotExists(String tenantCode, String desc, String queue,
String queueName);
Review Comment:
but I think shorter is better, so I create this one
--
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]