You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2022/12/17 03:26:20 UTC

[GitHub] [incubator-streampark] wangsizhu0504 commented on a diff in pull request #2175: [Improve] webui async function improve

wangsizhu0504 commented on code in PR #2175:
URL: https://github.com/apache/incubator-streampark/pull/2175#discussion_r1051250459


##########
streampark-console/streampark-console-webapp/src/views/flink/app/Add.vue:
##########
@@ -122,7 +121,7 @@
       }
     } else {
       openConfDrawer(false);
-      setFieldsValue({ isSetConfig: false, configOverride: null });
+      await setFieldsValue({ isSetConfig: false, configOverride: null });

Review Comment:
    It seems that there is no need to add await here. First of all, setFieldValue is not an asynchronous function and the function is to assign a value and does not need to be carried out asynchronously. Secondly, there is no code logic behind setFieldValue, and there is no need to await here.



##########
streampark-console/streampark-console-webapp/src/views/flink/variable/components/VariableDrawer.vue:
##########
@@ -150,7 +150,7 @@
     async (data: Recordable) => {
       try {
         variableId.value = null;
-        resetFields();
+        await resetFields();

Review Comment:
   ResetFieldValue is not an asynchronous function. It is not recommended to add the await keyword. In fact, it is just an assignment function and does not need to be performed asynchronously



##########
streampark-console/streampark-console-webapp/src/views/flink/app/EditStreamPark.vue:
##########
@@ -305,7 +304,7 @@
       project: app.projectId,
       ...defaultFormValue,
     });
-    nextTick(() => {
+    await nextTick(() => {

Review Comment:
   This is the content of editor settings. It should not affect the following logic, and it is not recommended to add await



-- 
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: issues-unsubscribe@streampark.apache.org

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